in the first image the area where the places are wrtten like for now karachi and islamabad is written it on its own should be editable not the section which opens after clicking it. yaha karachi wali jaga click kr ky kuch type nhi kr skty, blky nechy jo box aya ha waha pr click kryn to phr type kr skty ha, ye nhi hona chaye, jesy hi waha pr click kryn, agr likhna chaye to foran likh skyn, or dosra meny codes ka kaha tha ky wo jesy hi likh kr entry kryn wo city select ho jaye, mgr yaha hto jesy hi enter krty ha, jo query phly se fill ha us ka fare show ho jata ha , esa nhi hona chaye.


and in passangers we should be able to select a total of 9 passangers when someone selects 9 passangers they will be shown a warnig and the plus button will be deactivated after that. 


on the return fligh section we should not be able to click on show fare until both dates are selected the journey date and return date. 

shortforms should be able to be searched like when we search jed we should be recomended jeddah etc, decrese the space between the heading and the flight container on mobile view.

on the flight search page declude the option of departure and also make the show filters button work on mobile view as it is not opening a sidebar. 

on the cehcekout page if a passport expiry is in the next 6 months they should be shown a error adn the submit button should disable the error should say that your passport is expiring in the next 6 months and you are not eligible for traveling plz contact our support for further details.

multi select delete should be applied in admin panel where theres option to delete a thing.

while deleting a user it shows a error it says error deleting user plz check. 

1 to ye upper edit umrah wali ko jaga bhut choti di hoi ha, is ko bhi proper white back ground ky sth khobsorat bnaye, ye hr jaga hi esa ajeeb sa bana hoa ha, hr section me upper ki is jaga wali line drust kryn.
or ye airlines ya to sari airlines select krny ka option ho ya phr jo listed na ho us ko add krny ka option ho

pkgs me booking request krny pr kuch bhi show nhi ho raha, or na hi hamary pas WhatsApp pr koi query aa rhi ha


Android me ye esa design ho raha ha, is ko set kryn

Android me admin pannel login esy a rha ha

plz also fix the booking request page i think it was forgotten in the updates let me sahre its code make it responsive and fix it. also there make a option to delete flight request. and multi select delete. 

Voucher me esa q aa rha ha
Terms and conditions me

also for vouchers make a page now this page will work as a voucher online with every voucher we will have a scan when we scan it or a customer scans it they should be redirected to this page with the booing id or smth this scan should be made with each voucher let me share the voucher i need this on and change the name from Safere haram to RF Travel and Tours

Oper text bara bhtreen or zbrdast likha hoa ha, table me acha lg raha ha.
Nechy bilkul hi ajeeb se ho gya ha 
Is ko bhi uper waly se match kryn


Yaha bhi esy ho, jo chez likhyn us ka tab show ho, wrna na ho

fix the ticket invoices edit page.

vender log section isnt working.

payment record isnt being added.


plz do these updates one by one with fully written code for each file


<?php
session_start();
include_once '../db-config.php';

// --- SECURITY CHECK: Ensure user is a logged-in admin ---
if (!isset($_SESSION['user_id']) || !isset($_SESSION['user_type']) || $_SESSION['user_type'] !== 'admin') {
    header("location: ../login.php");
    exit;
}

// --- FILTER AND PAGINATION SETUP ---
$allowed_filters = ['all', 'pending', 'confirmed', 'cancelled'];
$current_filter = $_GET['filter'] ?? 'pending'; // Default to 'pending'
if (!in_array($current_filter, $allowed_filters)) {
    $current_filter = 'pending';
}

function e($string)
{
    return htmlspecialchars($string ?? '', ENT_QUOTES, 'UTF-8');
}

// --- FUNCTION TO GET BOOKING DATA (to avoid code repetition) ---
function getBookings($conn, $booking_type, $filter, $items_per_page)
{
    $page_key = $booking_type . '_page';
    $current_page = max(1, (int)($_GET[$page_key] ?? 1));
    $offset = ($current_page - 1) * $items_per_page;

    $base_sql_from = "FROM bookings b LEFT JOIN users u ON b.user_id = u.id";
    $where_clauses = ["b.booking_type = ?"];
    $params = [$booking_type];
    $types = "s";

    if ($filter !== 'all') {
        $where_clauses[] = "b.status = ?";
        $params[] = $filter;
        $types .= "s";
    }
    $where_sql = "WHERE " . implode(" AND ", $where_clauses);

    $count_sql = "SELECT COUNT(*) as total $base_sql_from $where_sql";
    $stmt_count = $conn->prepare($count_sql);
    $stmt_count->bind_param($types, ...$params);
    $stmt_count->execute();
    $total_items = $stmt_count->get_result()->fetch_assoc()['total'];
    $total_pages = ceil($total_items / $items_per_page);

    $data_sql = "SELECT b.*, u.name as user_name, u.user_type $base_sql_from $where_sql ORDER BY b.created_at DESC LIMIT ?, ?";
    $stmt_data = $conn->prepare($data_sql);

    $final_params = $params;
    $final_params[] = $offset;
    $final_params[] = $items_per_page;
    $final_types = $types . "ii";

    $stmt_data->bind_param($final_types, ...$final_params);
    $stmt_data->execute();
    $result = $stmt_data->get_result();

    return [
        'result' => $result,
        'total_pages' => $total_pages,
        'current_page' => $current_page
    ];
}

$items_per_page = 15;
$flight_data = getBookings($conn, 'flight', $current_filter, $items_per_page);
$group_data = getBookings($conn, 'group', $current_filter, $items_per_page);

// --- PREPARE PAGINATION URLS TO PRESERVE FILTERS ---
$flight_pagination_params = ['filter' => $current_filter, 'group_page' => $group_data['current_page']];
$group_pagination_params = ['filter' => $current_filter, 'flight_page' => $flight_data['current_page']];

$success_message = $_SESSION['success_message'] ?? null;
unset($_SESSION['success_message']);
?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <link rel="icon" type="image/png" href="../images/logo-icon.png">

    <title>Manage Flight Requests</title>
    <link rel="icon" type="image/png" href="../images/logo-icon.png">

    <link rel="stylesheet" href="admin-style.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
    <style>
        .section-header {
            margin-top: 2rem;
            margin-bottom: 1rem;
            font-size: 1.5rem;
            color: #333;
            border-bottom: 2px solid #e9ecef;
            padding-bottom: 0.75rem;
        }

        .section-header:first-of-type {
            margin-top: 0;
        }
    </style>
</head>

<body>
    <div class="dashboard-wrapper">
        <?php include 'sidebar.php'; ?>
        <div class="main-content">
            <header class="main-header">
                <div class="user-info"><span>Manage Flight & Group Bookings</span></div>
            </header>
            <main class="content-body">
                <div class="page-header">
                    <h1 class="page-title">Booking Requests</h1>
                </div>

                <div class="filter-bar">
                    <a href="manage-flight-requests.php?filter=all" class="<?= $current_filter === 'all' ? 'active' : '' ?>">All</a>
                    <a href="manage-flight-requests.php?filter=pending" class="<?= $current_filter === 'pending' ? 'active' : '' ?>">Pending</a>
                    <a href="manage-flight-requests.php?filter=confirmed" class="<?= $current_filter === 'confirmed' ? 'active' : '' ?>">Confirmed</a>
                    <a href="manage-flight-requests.php?filter=cancelled" class="<?= $current_filter === 'cancelled' ? 'active' : '' ?>">Cancelled</a>
                </div>

                <?php if ($success_message): ?>
                    <div class="notice success"><?= e($success_message); ?></div>
                <?php endif; ?>

                <!-- FLIGHT BOOKINGS SECTION -->
                <h2 class="section-header"><i class="fa-solid fa-plane"></i> Flight Bookings</h2>
                <div class="content-card">
                    <div class="table-responsive">
                        <table>
                            <thead>
                                <tr>
                                    <th>Booking Ref</th>
                                    <th>Submitted By</th>
                                    <th>Route</th>
                                    <th>Date</th>
                                    <th>Status</th>
                                    <th style="width: 150px;">Actions</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php if ($flight_data['result']->num_rows > 0): ?>
                                    <?php while ($booking = $flight_data['result']->fetch_assoc()):
                                        $flight_details = json_decode($booking['flight_details'], true);

                                        // === THE FIX: Read from the new 'itineraries' structure ===
                                        $route = 'N/A';
                                        $date = 'N/A';
                                        if (isset($flight_details['itineraries'][0])) {
                                            $first_itinerary = $flight_details['itineraries'][0];
                                            $route = e($first_itinerary['origin'] ?? '') . ' - ' . e($first_itinerary['destination'] ?? '');
                                            if (!empty($first_itinerary['departureDate'])) {
                                                $date = date('d M Y', strtotime($first_itinerary['departureDate']));
                                            }
                                        }
                                        // ==========================================================

                                        $status_class = 'status-' . strtolower($booking['status']);
                                    ?>
                                        <tr>
                                            <td><strong><?= e($booking['booking_ref']) ?></strong></td>
                                            <td><?= e($booking['user_name']) ?> (<?= e(ucfirst($booking['user_type'])) ?>)</td>
                                            <td><?= $route ?></td>
                                            <td><?= $date ?></td>
                                            <td><span class="status-badge <?= $status_class ?>"><?= e(ucfirst($booking['status'])) ?></span></td>
                                            <td class="actions-cell">
                                                <a href="process-booking.php?id=<?= $booking['id'] ?>" class="btn btn-sm btn-primary" title="View & Process Booking">
                                                    <i class="fas fa-cogs"></i> View & Process
                                                </a>
                                            </td>
                                        </tr>
                                    <?php endwhile; ?>
                                <?php else: ?>
                                    <tr>
                                        <td colspan="6" class="text-center">No flight bookings found for this filter.</td>
                                    </tr>
                                <?php endif; ?>
                            </tbody>
                        </table>
                    </div>
                    <?php if ($flight_data['total_pages'] > 1): ?>
                        <div class="pagination-controls">
                            <?php if ($flight_data['current_page'] > 1): ?><a href="manage-flight-requests.php?<?= http_build_query(array_merge($flight_pagination_params, ['flight_page' => $flight_data['current_page'] - 1])) ?>" class="btn btn-secondary btn-sm">« Previous</a><?php endif; ?>
                            <span class="page-info">Page <?= $flight_data['current_page'] ?> of <?= $flight_data['total_pages'] ?></span>
                            <?php if ($flight_data['current_page'] < $flight_data['total_pages']): ?><a href="manage-flight-requests.php?<?= http_build_query(array_merge($flight_pagination_params, ['flight_page' => $flight_data['current_page'] + 1])) ?>" class="btn btn-secondary btn-sm">Next »</a><?php endif; ?>
                        </div>
                    <?php endif; ?>
                </div>

                <!-- GROUP BOOKINGS SECTION -->
                <h2 class="section-header"><i class="fa-solid fa-users"></i> Group Bookings</h2>
                <div class="content-card">
                    <div class="table-responsive">
                        <table>
                            <thead>
                                <tr>
                                    <th>Booking Ref</th>
                                    <th>Submitted By</th>
                                    <th>Route</th>
                                    <th>Date</th>
                                    <th>Status</th>
                                    <th style="width: 150px;">Actions</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php if ($group_data['result']->num_rows > 0): ?>
                                    <?php while ($booking = $group_data['result']->fetch_assoc()):
                                        $flight_details = json_decode($booking['flight_details'], true);
                                        $route = e($flight_details['route'] ?? 'N/A');
                                        $date = !empty($flight_details['departure_date']) ? date('d M Y', strtotime($flight_details['departure_date'])) : 'N/A';
                                        $status_class = 'status-' . strtolower($booking['status']);
                                    ?>
                                        <tr>
                                            <td><strong><?= e($booking['booking_ref']) ?></strong></td>
                                            <td><?= e($booking['user_name']) ?> (<?= e(ucfirst($booking['user_type'])) ?>)</td>
                                            <td><?= $route ?></td>
                                            <td><?= $date ?></td>
                                            <td><span class="status-badge <?= $status_class ?>"><?= e(ucfirst($booking['status'])) ?></span></td>
                                            <td class="actions-cell">
                                                <a href="process-booking.php?id=<?= $booking['id'] ?>" class="btn btn-sm btn-primary" title="View & Process Booking">
                                                    <i class="fas fa-cogs"></i> View & Process
                                                </a>
                                            </td>
                                        </tr>
                                    <?php endwhile; ?>
                                <?php else: ?>
                                    <tr>
                                        <td colspan="6" class="text-center">No group bookings found for this filter.</td>
                                    </tr>
                                <?php endif; ?>
                            </tbody>
                        </table>
                    </div>
                    <?php if ($group_data['total_pages'] > 1): ?>
                        <div class="pagination-controls">
                            <?php if ($group_data['current_page'] > 1): ?><a href="manage-flight-requests.php?<?= http_build_query(array_merge($group_pagination_params, ['group_page' => $group_data['current_page'] - 1])) ?>" class="btn btn-secondary btn-sm">« Previous</a><?php endif; ?>
                            <span class="page-info">Page <?= $group_data['current_page'] ?> of <?= $group_data['total_pages'] ?></span>
                            <?php if ($group_data['current_page'] < $group_data['total_pages']): ?><a href="manage-flight-requests.php?<?= http_build_query(array_merge($group_pagination_params, ['group_page' => $group_data['current_page'] + 1])) ?>" class="btn btn-secondary btn-sm">Next »</a><?php endif; ?>
                        </div>
                    <?php endif; ?>
                </div>
            </main>
        </div>
    </div>
</body>

</html>



-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Oct 04, 2025 at 08:18 PM
-- Server version: 9.1.0
-- PHP Version: 8.3.14

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `rf`
--

-- --------------------------------------------------------

--
-- Table structure for table `agent_commissions`
--

DROP TABLE IF EXISTS `agent_commissions`;
CREATE TABLE IF NOT EXISTS `agent_commissions` (
  `id` int NOT NULL AUTO_INCREMENT,
  `agent_id` int NOT NULL,
  `booking_id` int NOT NULL,
  `booking_type` varchar(50) NOT NULL COMMENT 'e.g., umrah, visa, flight',
  `service_name` varchar(255) NOT NULL,
  `customer_name` varchar(255) DEFAULT NULL,
  `commission_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','paid','cancelled') NOT NULL DEFAULT 'pending',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `agent_id_idx` (`agent_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `airlines`
--

DROP TABLE IF EXISTS `airlines`;
CREATE TABLE IF NOT EXISTS `airlines` (
  `id` int NOT NULL AUTO_INCREMENT,
  `airline_name` varchar(255) NOT NULL,
  `logo_url` varchar(255) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `airline_name` (`airline_name`)
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `airlines`
--

INSERT INTO `airlines` (`id`, `airline_name`, `logo_url`, `created_at`) VALUES
(5, 'test airline', 'test airline', '2025-09-27 18:15:58'),
(8, 'Emirates', 'https://cdn.worldvectorlogo.com/logos/emirates-2.svg', '2025-09-28 04:15:00'),
(9, 'Qatar Airways', 'https://cdn.worldvectorlogo.com/logos/qatar-airways-1.svg', '2025-09-28 04:15:10'),
(10, 'Saudi Arabian Airlines', 'https://example.com/saudia_logo.png', '2025-09-28 09:15:00'),
(11, 'Fly Nas', 'https://example.com/flynas_logo.png', '2025-09-28 09:16:00'),
(15, 'Turkish Airlines', 'https://example.com/turkish_logo.png', '2025-09-30 04:15:00'),
(16, 'Etihad Airways', 'https://example.com/etihad_logo.png', '2025-09-30 04:16:00'),
(17, 'Serene Air', 'https://example.com/serene_logo.png', '2025-09-30 04:17:00'),
(25, 'flydubai', 'https://example.com/logos/flydubai.png', '2025-10-01 06:00:00'),
(26, 'Jazeera Airways', 'https://example.com/logos/jazeera.png', '2025-10-01 06:01:00'),
(27, 'Oman Air', 'https://example.com/logos/oman-air.png', '2025-10-01 06:02:00');

-- --------------------------------------------------------

--
-- Table structure for table `bookings`
--

DROP TABLE IF EXISTS `bookings`;
CREATE TABLE IF NOT EXISTS `bookings` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_id` int NOT NULL,
  `booking_ref` varchar(20) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `booking_type` varchar(20) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT 'flight',
  `flight_details` longtext CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `passenger_details` longtext CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `contact_details` text CHARACTER SET latin1 COLLATE latin1_swedish_ci,
  `total_price` decimal(10,2) NOT NULL,
  `price_currency` varchar(10) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `status` enum('pending','confirmed','cancelled') CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT 'pending',
  `payment_receipt_path` varchar(255) DEFAULT NULL,
  `payment_tid` varchar(100) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `bookings`
--

INSERT INTO `bookings` (`id`, `user_id`, `booking_ref`, `booking_type`, `flight_details`, `passenger_details`, `contact_details`, `total_price`, `price_currency`, `status`, `payment_receipt_path`, `payment_tid`, `created_at`) VALUES
(1, 10, 'SPT-E9EDF579', 'flight', '{\"price\":31941,\"currency\":\"PKR\",\"baggage\":\"Not Specified\",\"meal\":\"Not Included\",\"itineraries\":[{\"departureTime\":\"07:00 AM\",\"departureDate\":\"Thu, Oct 2\",\"arrivalTime\":\"08:55 AM\",\"arrivalDate\":\"Thu, Oct 2\",\"origin\":\"KHI\",\"destination\":\"ISB\",\"duration\":\"1h 55m\",\"stops\":0,\"airlineName\":\"PAKISTAN INTERNATIONAL\",\"airlineLogo\":\"https:\\/\\/daisycon.io\\/images\\/airline\\/?width=150&height=150&iata=PK\",\"flightNumber\":\"PK-300\",\"segments\":[{\"airlineName\":\"PAKISTAN INTERNATIONAL\",\"airlineLogo\":\"https:\\/\\/daisycon.io\\/images\\/airline\\/?width=150&height=150&iata=PK\",\"flightNumber\":\"PK-300\",\"departure\":{\"iata\":\"KHI\",\"time\":\"07:00 AM\",\"date\":\"Thu, Oct 2\"},\"arrival\":{\"iata\":\"ISB\",\"time\":\"08:55 AM\",\"date\":\"Thu, Oct 2\"},\"duration\":\"1h 55m\"}]}]}', '{\"adults\":{\"1\":{\"title\":\"Mr\",\"firstName\":\"324\",\"lastName\":\"234\",\"dob\":\"2025-09-02\",\"passport\":\"Ab1313123\",\"doi\":\"2025-09-28\",\"doe\":\"2025-09-28\"}}}', '{\"email\":\"123@gmail.com\",\"phone\":\"123122323\"}', 31941.00, 'PKR', 'pending', NULL, NULL, '2025-09-27 20:47:50'),
(2, 11, 'SPT-691C98E7', 'flight', '{\"price\":31941,\"currency\":\"PKR\",\"baggage\":\"Not Specified\",\"meal\":\"Not Included\",\"itineraries\":[{\"departureTime\":\"04:00 PM\",\"departureDate\":\"Wed, Oct 1\",\"arrivalTime\":\"05:55 PM\",\"arrivalDate\":\"Wed, Oct 1\",\"origin\":\"KHI\",\"destination\":\"ISB\",\"duration\":\"1h 55m\",\"stops\":0,\"airlineName\":\"PAKISTAN INTERNATIONAL\",\"airlineLogo\":\"https:\\/\\/daisycon.io\\/images\\/airline\\/?width=150&height=150&iata=PK\",\"flightNumber\":\"PK-308\",\"segments\":[{\"airlineName\":\"PAKISTAN INTERNATIONAL\",\"airlineLogo\":\"https:\\/\\/daisycon.io\\/images\\/airline\\/?width=150&height=150&iata=PK\",\"flightNumber\":\"PK-308\",\"departure\":{\"iata\":\"KHI\",\"time\":\"04:00 PM\",\"date\":\"Wed, Oct 1\"},\"arrival\":{\"iata\":\"ISB\",\"time\":\"05:55 PM\",\"date\":\"Wed, Oct 1\"},\"duration\":\"1h 55m\"}]}]}', '{\"adults\":{\"1\":{\"title\":\"Mr\",\"firstName\":\"324\",\"lastName\":\"234\",\"dob\":\"2025-09-02\",\"passport\":\"Ab1313123\",\"doi\":\"2025-09-10\",\"doe\":\"2025-09-28\"}}}', '{\"email\":\"123@gmail.com\",\"phone\":\"45646\"}', 31941.00, 'PKR', 'pending', NULL, NULL, '2025-09-27 21:04:10'),
(3, 13, 'SPT-A1B2C3D4', 'flight', '{\"price\":45500,\"currency\":\"PKR\",\"baggage\":\"20kg Included\",\"meal\":\"Included\",\"itineraries\":[{\"departureTime\":\"10:00 AM\",\"departureDate\":\"Fri, Oct 10\",\"arrivalTime\":\"11:45 AM\",\"arrivalDate\":\"Fri, Oct 10\",\"origin\":\"LHE\",\"destination\":\"KHI\",\"duration\":\"1h 45m\",\"stops\":0,\"airlineName\":\"Emirates\",\"airlineLogo\":\"https://cdn.worldvectorlogo.com/logos/emirates-2.svg\",\"flightNumber\":\"EK-601\",\"segments\":[{\"airlineName\":\"Emirates\",\"airlineLogo\":\"https://cdn.worldvectorlogo.com/logos/emirates-2.svg\",\"flightNumber\":\"EK-601\",\"departure\":{\"iata\":\"LHE\",\"time\":\"10:00 AM\",\"date\":\"Fri, Oct 10\"},\"arrival\":{\"iata\":\"KHI\",\"time\":\"11:45 AM\",\"date\":\"Fri, Oct 10\"},\"duration\":\"1h 45m\"}]}]}', '{\"adults\":{\"1\":{\"title\":\"Ms\",\"firstName\":\"Alice\",\"lastName\":\"Johnson\",\"dob\":\"1990-05-15\",\"passport\":\"CJ1234567\",\"doi\":\"2022-01-20\",\"doe\":\"2032-01-19\"}}}', '{\"email\":\"alice.j@example.com\",\"phone\":\"03001112233\"}', 45500.00, 'PKR', 'confirmed', NULL, NULL, '2025-09-28 04:20:45'),
(4, 12, 'SPT-0B4FFC9D', 'flight', '{\"price\":31760,\"currency\":\"PKR\",\"refundable\":false,\"baggage\":\"Not Specified\",\"itineraries\":[{\"departureTime\":\"07:00\",\"departureTimestamp\":1759734000,\"arrivalTimestamp\":1759740900,\"departureDate\":\"Mon, Oct 6\",\"arrivalTime\":\"08:55\",\"arrivalDate\":\"Mon, Oct 6\",\"origin\":\"KHI\",\"destination\":\"ISB\",\"duration\":\"PT1H55M\",\"stops\":0,\"airlineName\":\"PAKISTAN INTERNATIONAL\",\"airlineLogo\":\"https:\\/\\/daisycon.io\\/images\\/airline\\/?width=150&height=150&iata=PK\",\"flightNumber\":\"PK-300\",\"segments\":[{\"airlineName\":\"PAKISTAN INTERNATIONAL\",\"airlineLogo\":\"https:\\/\\/daisycon.io\\/images\\/airline\\/?width=150&height=150&iata=PK\",\"flightNumber\":\"PK-300\",\"departure\":{\"iata\":\"KHI\",\"terminal\":null,\"time\":\"07:00 AM\",\"date\":\"Mon, Oct 6\"},\"arrival\":{\"iata\":\"ISB\",\"terminal\":null,\"time\":\"08:55 AM\",\"date\":\"Mon, Oct 6\"},\"duration\":\"1h 55m\"}]}]}', '{\"adults\":{\"1\":{\"title\":\"Mr\",\"firstName\":\"324\",\"lastName\":\"234\",\"dob\":\"2025-09-09\",\"passport\":\"Ab1313123\",\"doi\":\"2025-09-26\",\"doe\":\"2025-10-01\"}}}', '{\"email\":\"admin@gmail.com\",\"phone\":\"03336668684\"}', 31760.00, 'PKR', 'pending', NULL, NULL, '2025-09-30 17:57:45');

-- --------------------------------------------------------

--
-- Table structure for table `domestic_tours`
--

DROP TABLE IF EXISTS `domestic_tours`;
CREATE TABLE IF NOT EXISTS `domestic_tours` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tour_name` varchar(255) NOT NULL,
  `page_link` varchar(255) DEFAULT NULL,
  `location` varchar(255) NOT NULL,
  `duration_days` int NOT NULL,
  `audience` varchar(100) DEFAULT NULL COMMENT 'e.g. Groups, Couples, Families',
  `tour_type` varchar(100) DEFAULT NULL,
  `departure_point` varchar(255) DEFAULT NULL,
  `price_per_person` decimal(10,2) NOT NULL,
  `image_url` varchar(255) NOT NULL,
  `overview` text,
  `itinerary` text,
  `whats_included` text,
  `whats_excluded` text,
  `important_notes` text,
  `is_active` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1 = Active, 0 = Inactive',
  `display_order` int NOT NULL DEFAULT '0',
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `page_link` (`page_link`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `domestic_tours`
--

INSERT INTO `domestic_tours` (`id`, `tour_name`, `page_link`, `location`, `duration_days`, `audience`, `tour_type`, `departure_point`, `price_per_person`, `image_url`, `overview`, `itinerary`, `whats_included`, `whats_excluded`, `important_notes`, `is_active`, `display_order`, `last_updated`) VALUES
(1, 'NARAN KAGHAN', NULL, 'NARAN KAGHAN', 3, 'GROUPS,FAMILIES', NULL, NULL, 12500.00, 'https://seepakistantours.com/wp-content/uploads/2017/10/Naran-Kaghan-Tour-Saif-Ul-Malook.jpg', NULL, NULL, NULL, NULL, NULL, 1, 1, '2025-09-24 18:43:24'),
(2, 'KASHMIR NEELUM VALLEY', NULL, 'KASHMIR', 3, 'GROUPS,FAMILIES', NULL, NULL, 12500.00, 'https://dynamic-media-cdn.tripadvisor.com/media/photo-o/0a/7a/43/5b/gurez-valley-kel-to-taobat.jpg?w=1200&h=-1&s=1', NULL, NULL, NULL, NULL, NULL, 1, 2, '2025-09-24 18:48:02'),
(3, 'SHOGRAN AND SIRI PAYE MEADOWS', NULL, 'SHOGRAN', 2, '', NULL, NULL, 12500.00, 'https://wpassets.graana.com/blog/wp-content/uploads/2022/04/Shogran-View-1024x661.jpg', NULL, NULL, NULL, NULL, NULL, 1, 0, '2025-09-24 18:51:25'),
(4, 'SKARDU  PLUS HUNZA VALLEY', NULL, 'SKARDU', 8, 'GROUPS,FAMILIES', NULL, NULL, 27999.00, 'https://seepakistantours.com/wp-content/uploads/2022/11/Fairy-Meadows-Skardu-Hunza-12-Days-tour.jpg', NULL, NULL, NULL, NULL, NULL, 1, 0, '2025-09-24 18:55:48'),
(5, 'Swat Valley Kalam', 'swat-valley-kalam-tour', 'Swat', 5, 'GROUPS,FAMILIES,COUPLES', 'Scenic', 'Islamabad', 18000.00, 'https://upload.wikimedia.org/wikipedia/commons/6/6c/Swat_Valley.jpg', NULL, NULL, NULL, NULL, NULL, 1, 3, '2025-09-28 13:29:42'),
(6, 'Mystical Hunza Valley', 'hunza-valley-tour', 'Hunza', 7, 'Couples, Families', 'Adventure, Scenic', 'Islamabad', 35000.00, 'https://example.com/hunza.jpg', 'Discover the breathtaking beauty of Hunza valley, from ancient forts to serene lakes.', NULL, NULL, NULL, NULL, 1, 3, '2025-09-28 13:40:56');

-- --------------------------------------------------------

--
-- Table structure for table `group_fares`
--

DROP TABLE IF EXISTS `group_fares`;
CREATE TABLE IF NOT EXISTS `group_fares` (
  `id` int NOT NULL AUTO_INCREMENT,
  `group_ref_id` varchar(50) NOT NULL,
  `airline_id` int NOT NULL,
  `sector` varchar(100) NOT NULL DEFAULT 'Umrah Group',
  `route` varchar(100) NOT NULL COMMENT 'e.g., ISB-JED',
  `duration_days` int NOT NULL,
  `departure_date` date NOT NULL,
  `total_seats` int NOT NULL,
  `remaining_seats` int NOT NULL DEFAULT '0',
  `price_adult` decimal(12,2) NOT NULL,
  `price_adult_agent` decimal(12,2) DEFAULT NULL,
  `price_child` decimal(12,2) NOT NULL DEFAULT '0.00',
  `price_child_agent` decimal(12,2) DEFAULT NULL,
  `price_infant` decimal(12,2) NOT NULL DEFAULT '0.00',
  `price_infant_agent` decimal(12,2) DEFAULT NULL,
  `agent_incentive` decimal(10,2) NOT NULL DEFAULT '0.00',
  `price_currency` varchar(10) NOT NULL DEFAULT 'PKR',
  `flight_details_json` longtext CHARACTER SET latin1 COLLATE latin1_swedish_ci COMMENT 'Stores outbound, inbound, and baggage info',
  `is_active` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1 = Active, 0 = Inactive',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `group_ref_id` (`group_ref_id`),
  KEY `fk_airline` (`airline_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `group_fares`
--

INSERT INTO `group_fares` (`id`, `group_ref_id`, `airline_id`, `sector`, `route`, `duration_days`, `departure_date`, `total_seats`, `remaining_seats`, `price_adult`, `price_adult_agent`, `price_child`, `price_child_agent`, `price_infant`, `price_infant_agent`, `agent_incentive`, `price_currency`, `flight_details_json`, `is_active`, `created_at`) VALUES
(2, 'SV-UMR-OCT25', 10, 'Umrah Group', 'KHI-JED-KHI', 15, '2025-10-15', 50, 50, 185000.00, NULL, 160000.00, NULL, 45000.00, NULL, 0.00, 'PKR', '{\"outbound\":{\"flight\":\"SV707\",\"departure\":\"KHI 09:00\",\"arrival\":\"JED 11:30\"},\"inbound\":{\"flight\":\"SV706\",\"departure\":\"JED 22:00\",\"arrival\":\"KHI 04:15\"},\"baggage\":\"1pc x 23kg\"}', 1, '2025-09-28 13:40:56');

-- --------------------------------------------------------

--
-- Table structure for table `hotels`
--

DROP TABLE IF EXISTS `hotels`;
CREATE TABLE IF NOT EXISTS `hotels` (
  `id` int NOT NULL AUTO_INCREMENT,
  `hotel_name` varchar(255) NOT NULL,
  `location` varchar(255) NOT NULL,
  `rating` tinyint(1) NOT NULL COMMENT 'Value from 1 to 5',
  `price_per_night` decimal(10,2) NOT NULL,
  `price_per_night_agent` decimal(10,2) DEFAULT NULL,
  `agent_incentive` decimal(10,2) NOT NULL DEFAULT '0.00',
  `image_url` varchar(255) NOT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1 = Active, 0 = Inactive',
  `display_order` int NOT NULL DEFAULT '0',
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `hotels`
--

INSERT INTO `hotels` (`id`, `hotel_name`, `location`, `rating`, `price_per_night`, `price_per_night_agent`, `agent_incentive`, `image_url`, `is_active`, `display_order`, `last_updated`) VALUES
(6, 'Makkah Clock Royal Tower', 'Makkah, KSA', 5, 950.00, NULL, 0.00, 'https://example.com/makkah_clock_tower.jpg', 1, 3, '2025-09-28 09:20:00'),
(7, 'Anwar Al Madinah Mövenpick', 'Madinah, KSA', 5, 800.00, NULL, 0.00, 'https://example.com/movenpick_madinah.jpg', 1, 4, '2025-09-28 09:21:00'),
(8, 'Swissotel Makkah', 'Makkah, KSA', 5, 850.00, NULL, 0.00, 'https://example.com/swissotel_makkah.jpg', 1, 5, '2025-09-28 13:44:38'),
(9, 'Dar Al Taqwa Hotel Madinah', 'Madinah, KSA', 5, 900.00, NULL, 0.00, 'https://example.com/dar_al_taqwa.jpg', 1, 6, '2025-09-28 13:44:38'),
(20, 'Serena Hotel Islamabad', 'Islamabad, Pakistan', 5, 45000.00, NULL, 0.00, 'https://dynamic-media-cdn.tripadvisor.com/media/photo-o/26/a7/6c/42/islamabad-serena-hotel.jpg?w=1200&h=-1&s=1', 1, 1, '2025-09-28 13:52:46'),
(21, 'PC Hotel Lahore', 'Lahore, Pakistan', 5, 38000.00, NULL, 0.00, 'https://media-cdn.tripadvisor.com/media/photo-s/02/7a/7f/7a/pearl-continental-hotel.jpg', 1, 2, '2025-09-28 13:52:46'),
(22, 'Avari Towers Karachi', 'Karachi, Pakistan', 4, 32000.00, NULL, 0.00, 'https://cf.bstatic.com/xdata/images/hotel/max1024x768/489065158.jpg?k=b4e951474813f81e3090740b2e86fc90a937a092c40c8f14115b165b452e6460&o=&hp=1', 1, 3, '2025-09-28 13:52:46');

-- --------------------------------------------------------

--
-- Table structure for table `international_tours`
--

DROP TABLE IF EXISTS `international_tours`;
CREATE TABLE IF NOT EXISTS `international_tours` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tour_name` varchar(255) NOT NULL,
  `page_link` varchar(255) DEFAULT NULL,
  `location` varchar(255) NOT NULL,
  `duration_days` int NOT NULL,
  `audience` varchar(100) DEFAULT NULL COMMENT 'e.g. Couples, Groups, Families',
  `tour_type` varchar(100) DEFAULT NULL,
  `departure_point` varchar(255) DEFAULT NULL,
  `price_per_person` decimal(10,2) NOT NULL,
  `price_currency` varchar(10) NOT NULL DEFAULT 'USD',
  `image_url` varchar(255) NOT NULL,
  `overview` text,
  `itinerary` text,
  `whats_included` text,
  `whats_excluded` text,
  `important_notes` text,
  `is_active` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1 = Active, 0 = Inactive',
  `display_order` int NOT NULL DEFAULT '0',
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `page_link` (`page_link`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `international_tours`
--

INSERT INTO `international_tours` (`id`, `tour_name`, `page_link`, `location`, `duration_days`, `audience`, `tour_type`, `departure_point`, `price_per_person`, `price_currency`, `image_url`, `overview`, `itinerary`, `whats_included`, `whats_excluded`, `important_notes`, `is_active`, `display_order`, `last_updated`) VALUES
(1, 'ASIA TOUR PACKAGE 5 IN 1 ', '1', 'THAILAND , MALAYSIA , SRI LANKA , INDONESIA & MALDIVES', 10, 'GROUPS,FAMILIES', 'ADVENTURE', 'LAHORE', 450000.00, 'PKR', 'https://www.trips.pk/main-root/transferImages/01JR04ESCQAPWNRRNPX9CRJ7EM-Singapore-malaysia-thailand-tour-packages.webp', '', '', '', '', '', 1, 1, '2025-09-25 16:01:55'),
(5, 'ASIA TOUR PACKAGE 4 IN 1 ', '2', 'THAILAND , MALAYSIA , SRI LANKA & MALDIVES ', 10, 'GROUPS,FAMILIES', 'ADVENTURE', 'LAHORE', 390000.00, 'PKR', 'https://www.nariatravels.com/uploads/0000/1/2023/07/08/m-sl.jpg', '', '', '', '', '', 1, 0, '2025-09-25 16:02:33'),
(6, 'ASIA TOUR PACKAGE 3 IN 1 ', '3', 'THAILAND , MALAYSIA & SRI LANKA', 10, 'GROUPS,FAMILIES', 'ADVENTURE', 'LAHORE', 320000.00, 'PKR', 'https://www.everestholidays.com.bd/wp-content/uploads/2024/04/malaysia-111avril-1.jpg', '', '', '', '', '', 1, 0, '2025-09-25 16:06:57'),
(7, 'Magical Istanbul & Cappadocia', 'turkey-istanbul-cappadocia', 'Turkey', 8, 'COUPLES,FAMILIES', 'Cultural', 'Karachi', 1250.00, 'USD', 'https://i.natgeofe.com/n/5a4c6f0b-e6e7-4989-b8d5-6700ab20c438/98282_3x2.jpg', NULL, NULL, NULL, NULL, NULL, 1, 2, '2025-09-28 13:29:42'),
(8, 'Wonders of Egypt', 'egypt-cairo-luxor-tour', 'Egypt (Cairo, Luxor)', 8, 'Groups, History Buffs', 'Historical, Cultural', 'Lahore', 1450.00, 'USD', 'https://example.com/egypt_pyramids.jpg', NULL, NULL, NULL, NULL, NULL, 1, 0, '2025-09-28 13:44:38');

-- --------------------------------------------------------

--
-- Table structure for table `invoices`
--

DROP TABLE IF EXISTS `invoices`;
CREATE TABLE IF NOT EXISTS `invoices` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_id` int DEFAULT NULL,
  `vendor_id` int DEFAULT NULL,
  `guest_name` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `invoice_number` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `status` enum('Tentative','Approved') CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT 'Tentative',
  `issue_date` date NOT NULL,
  `exchange_rate` decimal(10,2) NOT NULL,
  `total_sar` decimal(15,2) DEFAULT '0.00',
  `total_pkr_without_ticket` decimal(15,2) DEFAULT '0.00',
  `total_ticket_pkr` decimal(15,2) DEFAULT '0.00',
  `discount_pkr` decimal(10,2) NOT NULL DEFAULT '0.00',
  `service_fee_pkr` decimal(10,2) NOT NULL DEFAULT '0.00',
  `grand_total_pkr` decimal(15,2) DEFAULT '0.00',
  `grand_total_pkr_cost` decimal(10,2) NOT NULL DEFAULT '0.00',
  `notes` text CHARACTER SET latin1 COLLATE latin1_swedish_ci,
  `pilgrims_vendor_id` int DEFAULT NULL,
  `transport_vendor_id` int DEFAULT NULL,
  `tickets_vendor_id` int DEFAULT NULL,
  `issued_by` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT 'Ibn-e-Yousuf Travel & Tours Pvt Ltd.',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `invoices`
--

INSERT INTO `invoices` (`id`, `user_id`, `vendor_id`, `guest_name`, `invoice_number`, `status`, `issue_date`, `exchange_rate`, `total_sar`, `total_pkr_without_ticket`, `total_ticket_pkr`, `discount_pkr`, `service_fee_pkr`, `grand_total_pkr`, `grand_total_pkr_cost`, `notes`, `pilgrims_vendor_id`, `transport_vendor_id`, `tickets_vendor_id`, `issued_by`, `created_at`) VALUES
(3, 14, NULL, 'Zaid Ahmed Family', 'INV-2025-003', 'Tentative', '2025-09-28', 75.50, 2500.00, 188750.00, 0.00, 0.00, 0.00, 188750.00, 180000.00, NULL, NULL, NULL, NULL, 'Ibn-e-Yousuf Travel & Tours Pvt Ltd.', '2025-09-28 13:29:42'),
(4, 17, NULL, 'Ali Raza Family', 'INV-PK-0015', 'Tentative', '2025-09-28', 76.50, 11780.00, 901170.00, 740000.00, 1170.00, 5000.00, 1645000.00, 1600000.00, '15 Days 5-Star Family Umrah Package for October 2025.', 4, 5, NULL, 'Ibn-e-Yousuf Travel & Tours Pvt Ltd.', '2025-09-28 13:40:56'),
(6, 13, NULL, 'Alice Johnson', '92157201', 'Tentative', '2025-09-30', 12.00, 120.00, 1440.00, 0.00, 0.00, 0.00, 1440.00, 1440.00, '1. Please provide your approval in written to proceed booking...', NULL, NULL, NULL, 'Ibn-e-Yousuf Travel & Tours Pvt Ltd.', '2025-09-30 13:20:46');

-- --------------------------------------------------------

--
-- Table structure for table `invoice_airline_tickets`
--

DROP TABLE IF EXISTS `invoice_airline_tickets`;
CREATE TABLE IF NOT EXISTS `invoice_airline_tickets` (
  `id` int NOT NULL AUTO_INCREMENT,
  `invoice_id` int NOT NULL,
  `airline` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `sector` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `adult_qty` int NOT NULL DEFAULT '0',
  `adult_rate` decimal(10,2) NOT NULL DEFAULT '0.00',
  `child_qty` int NOT NULL DEFAULT '0',
  `child_rate` decimal(10,2) NOT NULL DEFAULT '0.00',
  `infant_qty` int NOT NULL DEFAULT '0',
  `infant_rate` decimal(10,2) NOT NULL DEFAULT '0.00',
  `total_amount` decimal(10,2) NOT NULL DEFAULT '0.00',
  `total_cost` decimal(10,2) NOT NULL DEFAULT '0.00',
  PRIMARY KEY (`id`),
  KEY `invoice_id` (`invoice_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `invoice_airline_tickets`
--

INSERT INTO `invoice_airline_tickets` (`id`, `invoice_id`, `airline`, `sector`, `adult_qty`, `adult_rate`, `child_qty`, `child_rate`, `infant_qty`, `infant_rate`, `total_amount`, `total_cost`) VALUES
(2, 4, 'Saudi Arabian Airlines', 'LHE-JED | MED-LHE', 2, 220000.00, 1, 180000.00, 1, 40000.00, 740000.00, 710000.00);

-- --------------------------------------------------------

--
-- Table structure for table `invoice_hotels`
--

DROP TABLE IF EXISTS `invoice_hotels`;
CREATE TABLE IF NOT EXISTS `invoice_hotels` (
  `id` int NOT NULL AUTO_INCREMENT,
  `invoice_id` int NOT NULL,
  `city` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `check_in` date NOT NULL,
  `check_out` date NOT NULL,
  `nights` int NOT NULL,
  `rooms` int NOT NULL,
  `room_type` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `meal_plan` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `hotel_name` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `rate_sar` decimal(10,2) NOT NULL,
  `rate_sar_cost` decimal(10,2) NOT NULL DEFAULT '0.00',
  `total_sar` decimal(10,2) NOT NULL,
  `vendor_id` int DEFAULT NULL,
  `helpline` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `invoice_id` (`invoice_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `invoice_hotels`
--

INSERT INTO `invoice_hotels` (`id`, `invoice_id`, `city`, `check_in`, `check_out`, `nights`, `rooms`, `room_type`, `meal_plan`, `hotel_name`, `rate_sar`, `rate_sar_cost`, `total_sar`, `vendor_id`, `helpline`) VALUES
(1, 3, 'Makkah', '2025-10-20', '2025-10-25', 5, 1, 'Quad', 'RO', 'Emaar Grand', 150.00, 0.00, 750.00, NULL, NULL),
(3, 4, 'Makkah', '2025-10-16', '2025-10-23', 7, 1, 'Junior Suite', 'BB', 'Makkah Clock Royal Tower', 800.00, 750.00, 5600.00, 4, NULL),
(4, 4, 'Madinah', '2025-10-23', '2025-10-31', 8, 1, 'Junior Suite', 'BB', 'Anwar Al Madinah Mövenpick', 500.00, 470.00, 4000.00, 4, NULL),
(5, 6, 'Makkah', '2025-10-02', '2025-10-12', 10, 1, 'Quad', 'RO', 'test', 0.00, 0.00, 0.00, NULL, '123213213');

-- --------------------------------------------------------

--
-- Table structure for table `invoice_other_services`
--

DROP TABLE IF EXISTS `invoice_other_services`;
CREATE TABLE IF NOT EXISTS `invoice_other_services` (
  `id` int NOT NULL AUTO_INCREMENT,
  `invoice_id` int NOT NULL,
  `service_name` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `adult_rate` decimal(10,2) NOT NULL DEFAULT '0.00',
  `adult_qty` int NOT NULL DEFAULT '0',
  `child_rate` decimal(10,2) NOT NULL DEFAULT '0.00',
  `child_qty` int NOT NULL DEFAULT '0',
  `infant_rate` decimal(10,2) NOT NULL DEFAULT '0.00',
  `infant_qty` int NOT NULL DEFAULT '0',
  `total_amount` decimal(10,2) NOT NULL DEFAULT '0.00',
  `total_cost` decimal(10,2) NOT NULL DEFAULT '0.00',
  `vendor_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `invoice_id` (`invoice_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `invoice_other_services`
--

INSERT INTO `invoice_other_services` (`id`, `invoice_id`, `service_name`, `adult_rate`, `adult_qty`, `child_rate`, `child_qty`, `infant_rate`, `infant_qty`, `total_amount`, `total_cost`, `vendor_id`) VALUES
(4, 4, 'Ziarat Makkah (Private)', 250.00, 1, 0.00, 0, 0.00, 0, 250.00, 220.00, 5),
(5, 4, 'Ziarat Madinah (Private)', 250.00, 1, 0.00, 0, 0.00, 0, 250.00, 220.00, 5);

-- --------------------------------------------------------

--
-- Table structure for table `invoice_pilgrims`
--

DROP TABLE IF EXISTS `invoice_pilgrims`;
CREATE TABLE IF NOT EXISTS `invoice_pilgrims` (
  `id` int NOT NULL AUTO_INCREMENT,
  `invoice_id` int NOT NULL,
  `passport_no` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `passenger_details` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `dob` date DEFAULT NULL,
  `dox` date DEFAULT NULL,
  `pax` varchar(20) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `bed` varchar(10) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `visa_price_sar` decimal(10,2) NOT NULL DEFAULT '0.00',
  `visa_price_sar_cost` decimal(10,2) NOT NULL DEFAULT '0.00',
  PRIMARY KEY (`id`),
  KEY `invoice_id` (`invoice_id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `invoice_pilgrims`
--

INSERT INTO `invoice_pilgrims` (`id`, `invoice_id`, `passport_no`, `passenger_details`, `dob`, `dox`, `pax`, `bed`, `visa_price_sar`, `visa_price_sar_cost`) VALUES
(5, 3, 'AB9876543', 'Zaid Ahmed', NULL, NULL, 'Adult', 'Yes', 450.00, 420.00),
(6, 3, 'CD1234567', 'Sana Ahmed', NULL, NULL, 'Adult', 'Yes', 450.00, 420.00),
(7, 3, 'EF5678901', 'Omar Ahmed', NULL, NULL, 'Child', 'No', 450.00, 420.00),
(9, 4, 'BM1234567', 'Ali Raza', '1980-01-15', '2032-05-19', 'Adult', 'TRUE', 600.00, 550.00),
(10, 4, 'BP7654321', 'Saba Ali', '1982-03-22', '2032-05-19', 'Adult', 'TRUE', 600.00, 550.00),
(11, 4, 'CH9988776', 'Hassan Ali', '2015-11-10', '2028-01-29', 'Child', 'TRUE', 600.00, 550.00),
(12, 4, 'IN6655443', 'Ayesha Ali', '2024-08-01', '2029-08-31', 'Infant', 'FALSE', 300.00, 280.00),
(14, 6, '342', '234', '2025-09-10', '2025-09-10', 'Adult', 'TRUE', 120.00, 120.00);

-- --------------------------------------------------------

--
-- Table structure for table `invoice_transports`
--

DROP TABLE IF EXISTS `invoice_transports`;
CREATE TABLE IF NOT EXISTS `invoice_transports` (
  `id` int NOT NULL AUTO_INCREMENT,
  `invoice_id` int NOT NULL,
  `vehicle_type` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `route` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `rate` decimal(10,2) NOT NULL DEFAULT '0.00',
  `rate_cost` decimal(10,2) NOT NULL DEFAULT '0.00',
  `qty` int NOT NULL DEFAULT '1',
  `adult_qty` int NOT NULL DEFAULT '0',
  `child_qty` int NOT NULL DEFAULT '0',
  `total_amount` decimal(10,2) NOT NULL DEFAULT '0.00',
  `total_amount_cost` decimal(10,2) NOT NULL DEFAULT '0.00',
  PRIMARY KEY (`id`),
  KEY `invoice_id` (`invoice_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `invoice_transports`
--

INSERT INTO `invoice_transports` (`id`, `invoice_id`, `vehicle_type`, `route`, `rate`, `rate_cost`, `qty`, `adult_qty`, `child_qty`, `total_amount`, `total_amount_cost`) VALUES
(1, 3, 'GMC', 'JED-MAK-MED-JED', 400.00, 0.00, 1, 0, 0, 400.00, 0.00),
(3, 4, 'GMC / Yukon', 'JED-MAK', 300.00, 280.00, 1, 0, 0, 300.00, 280.00),
(4, 4, 'GMC / Yukon', 'MAK-MED', 500.00, 480.00, 1, 0, 0, 500.00, 480.00),
(5, 4, 'GMC / Yukon', 'MED Airport', 80.00, 70.00, 1, 0, 0, 80.00, 70.00);

-- --------------------------------------------------------

--
-- Table structure for table `manual_payments`
--

DROP TABLE IF EXISTS `manual_payments`;
CREATE TABLE IF NOT EXISTS `manual_payments` (
  `id` int NOT NULL AUTO_INCREMENT,
  `booking_ref` varchar(100) NOT NULL,
  `user_id` int DEFAULT NULL,
  `customer_name` varchar(255) NOT NULL,
  `amount_paid` decimal(10,2) NOT NULL,
  `payment_method` varchar(100) NOT NULL,
  `receipt_image_path` varchar(255) NOT NULL,
  `status` varchar(50) NOT NULL DEFAULT 'Pending',
  `submission_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `review_date` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `notifications`
--

DROP TABLE IF EXISTS `notifications`;
CREATE TABLE IF NOT EXISTS `notifications` (
  `id` int NOT NULL AUTO_INCREMENT,
  `type` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `message` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `link` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `is_read` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `notifications`
--

INSERT INTO `notifications` (`id`, `type`, `message`, `link`, `is_read`, `created_at`) VALUES
(1, 'New Umrah Inquiry', 'Inquiry for 21 DAYS UMRAH PACKAGE from toheed.', 'admin/view-inquiries.php', 1, '2025-09-27 18:05:13'),
(2, 'New Umrah Inquiry', 'Inquiry for 21 DAYS UMRAH PACKAGE from werwe.', 'admin/view-inquiries.php', 1, '2025-09-27 20:55:03'),
(3, 'New Umrah Inquiry', 'Inquiry for 15 DAYS 5-STAR UMRAH from Alice Johnson.', 'admin/view-inquiries.php', 1, '2025-09-28 04:35:11');

-- --------------------------------------------------------

--
-- Table structure for table `package_hotels`
--

DROP TABLE IF EXISTS `package_hotels`;
CREATE TABLE IF NOT EXISTS `package_hotels` (
  `id` int NOT NULL AUTO_INCREMENT,
  `hotel_name` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `location` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `city` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `star_rating` tinyint(1) NOT NULL DEFAULT '5',
  `sharing_rate` decimal(10,2) DEFAULT '0.00',
  `sharing_rate_agent` decimal(10,2) DEFAULT NULL,
  `double_rate` decimal(10,2) DEFAULT '0.00',
  `double_rate_agent` decimal(10,2) DEFAULT NULL,
  `triple_rate` decimal(10,2) DEFAULT '0.00',
  `triple_rate_agent` decimal(10,2) DEFAULT NULL,
  `quad_rate` decimal(10,2) DEFAULT '0.00',
  `quad_rate_agent` decimal(10,2) DEFAULT NULL,
  `room` decimal(10,2) DEFAULT NULL,
  `room_agent` decimal(10,2) DEFAULT NULL,
  `agent_incentive` decimal(10,2) NOT NULL DEFAULT '0.00',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `package_hotels`
--

INSERT INTO `package_hotels` (`id`, `hotel_name`, `location`, `city`, `star_rating`, `sharing_rate`, `sharing_rate_agent`, `double_rate`, `double_rate_agent`, `triple_rate`, `triple_rate_agent`, `quad_rate`, `quad_rate_agent`, `room`, `room_agent`, `agent_incentive`) VALUES
(1, 'test 2', 'location', 'makkah', 3, 10.00, NULL, 10.00, NULL, 10.00, NULL, 10.00, NULL, 10.00, NULL, 0.00),
(2, 'Emaar Grand', 'Ibrahim Al Khalil Rd', 'makkah', 4, 0.00, NULL, 350.00, NULL, 375.00, NULL, 400.00, NULL, NULL, NULL, 0.00),
(3, 'Dar Al Naeem', 'Near Masjid an Nabawi', 'madinah', 4, 0.00, NULL, 300.00, NULL, 330.00, NULL, 360.00, NULL, NULL, NULL, 0.00),
(4, 'Qaswa Tower', 'Mahbas Al Jin', 'makkah', 3, 0.00, NULL, 200.00, NULL, 225.00, NULL, 250.00, NULL, NULL, NULL, 0.00);

-- --------------------------------------------------------

--
-- Table structure for table `pakistan_umrah_inquiries`
--

DROP TABLE IF EXISTS `pakistan_umrah_inquiries`;
CREATE TABLE IF NOT EXISTS `pakistan_umrah_inquiries` (
  `id` int NOT NULL AUTO_INCREMENT,
  `package_id` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `package_name` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `customer_name` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `customer_phone` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `customer_email` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `room_type` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `pax` int NOT NULL,
  `status` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT 'New',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `pakistan_umrah_inquiries`
--

INSERT INTO `pakistan_umrah_inquiries` (`id`, `package_id`, `package_name`, `customer_name`, `customer_phone`, `customer_email`, `room_type`, `pax`, `status`, `created_at`) VALUES
(1, 'UMR-005', '21 DAYS UMRAH PACKAGE', 'Khalid Butt', '03001234567', 'khalid.b@example.com', 'Triple', 3, 'Follow-up', '2025-09-28 13:44:38');

-- --------------------------------------------------------

--
-- Table structure for table `payments`
--

DROP TABLE IF EXISTS `payments`;
CREATE TABLE IF NOT EXISTS `payments` (
  `id` int NOT NULL AUTO_INCREMENT,
  `invoice_id` int DEFAULT NULL,
  `invoice_type` varchar(20) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `user_id` int DEFAULT NULL,
  `vendor_id` int DEFAULT NULL,
  `payment_date` date NOT NULL,
  `payment_amount` decimal(10,2) NOT NULL,
  `credit_amount` decimal(10,2) NOT NULL DEFAULT '0.00',
  `debit_amount` decimal(10,2) NOT NULL DEFAULT '0.00',
  `payment_method` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `invoice_reference` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `notes` text CHARACTER SET latin1 COLLATE latin1_swedish_ci,
  `receipt_image_path` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `invoice_id` (`invoice_id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `payments`
--

INSERT INTO `payments` (`id`, `invoice_id`, `invoice_type`, `user_id`, `vendor_id`, `payment_date`, `payment_amount`, `credit_amount`, `debit_amount`, `payment_method`, `invoice_reference`, `notes`, `receipt_image_path`, `created_at`) VALUES
(2, NULL, NULL, 2, 1, '2025-10-10', 234.00, 234.00, 0.00, 'Card', 'adsd', 'rtr', NULL, '2025-09-27 18:08:21'),
(6, NULL, 'ticket', 26, NULL, '2025-09-30', 238000.00, 0.00, 238000.00, 'Cash', 'TKT-25-003', NULL, NULL, '2025-09-28 13:44:38');

-- --------------------------------------------------------

--
-- Table structure for table `quick_bookings`
--

DROP TABLE IF EXISTS `quick_bookings`;
CREATE TABLE IF NOT EXISTS `quick_bookings` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_id` int DEFAULT NULL,
  `customer_name` varchar(255) NOT NULL,
  `package_type` varchar(100) NOT NULL,
  `room_type` varchar(100) NOT NULL,
  `status` varchar(50) NOT NULL DEFAULT 'Pending',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=100006 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `quick_bookings`
--

INSERT INTO `quick_bookings` (`id`, `user_id`, `customer_name`, `package_type`, `room_type`, `status`, `created_at`) VALUES
(100001, 7, 'MUHAMMAD HUZAIFA ATTARI', 'Star', 'Triple', 'Cancelled', '2025-09-27 18:01:37'),
(100002, 10, 'customer', 'Star', 'Double', 'Confirmed', '2025-09-27 20:06:38'),
(100003, 14, 'Zaid Ahmed Family', 'Economy Plus', 'Quad', 'Pending', '2025-09-28 04:50:00'),
(100004, 17, 'Ali Raza Family', '5 Star', 'Suite', 'Pending', '2025-09-28 10:00:00'),
(100005, 26, 'Sultan Khan Family', 'Economy', 'Quint', 'Confirmed', '2025-09-30 06:00:00');

-- --------------------------------------------------------

--
-- Table structure for table `quick_booking_passengers`
--

DROP TABLE IF EXISTS `quick_booking_passengers`;
CREATE TABLE IF NOT EXISTS `quick_booking_passengers` (
  `id` int NOT NULL AUTO_INCREMENT,
  `booking_id` int NOT NULL,
  `is_family_head` tinyint(1) NOT NULL DEFAULT '0',
  `full_name` varchar(255) NOT NULL,
  `passport_no` varchar(100) DEFAULT NULL,
  `visa_no` varchar(100) DEFAULT NULL,
  `dob` date DEFAULT NULL,
  `gender` varchar(20) DEFAULT NULL,
  `pax_type` varchar(20) NOT NULL DEFAULT 'Adult',
  `bed_required` varchar(10) NOT NULL DEFAULT 'Yes',
  `group_no` varchar(100) DEFAULT NULL,
  `pnr_no` varchar(100) DEFAULT NULL,
  `passport_issue_date` date DEFAULT NULL,
  `passport_expiry_date` date DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `booking_id` (`booking_id`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `quick_booking_passengers`
--

INSERT INTO `quick_booking_passengers` (`id`, `booking_id`, `is_family_head`, `full_name`, `passport_no`, `visa_no`, `dob`, `gender`, `pax_type`, `bed_required`, `group_no`, `pnr_no`, `passport_issue_date`, `passport_expiry_date`) VALUES
(1, 100001, 1, '223', '1231', '23', '2025-10-08', 'Male', 'Adult', 'Yes', '12', '123', NULL, NULL),
(2, 100002, 0, 'tester12', '223', '223', '2025-10-02', 'Male', 'Adult', 'Yes', '223223', '223', '2025-09-24', '2025-10-08'),
(3, 100002, 1, 'tester', '223', '223', '2025-10-08', 'Male', 'Adult', 'Yes', '223', '223', '2025-09-10', '2025-10-11'),
(4, 100002, 0, 'tester 2', '223', '223', '2025-10-10', 'Male', 'Adult', 'Yes', '223', '223', '2025-09-07', '2025-10-08'),
(5, 100003, 1, 'Zaid Ahmed', 'AB9876543', NULL, NULL, NULL, 'Adult', 'Yes', NULL, NULL, NULL, NULL),
(6, 100003, 0, 'Sana Ahmed', 'CD1234567', NULL, NULL, NULL, 'Adult', 'Yes', NULL, NULL, NULL, NULL),
(7, 100003, 0, 'Omar Ahmed', 'EF5678901', NULL, NULL, NULL, 'Child', 'No', NULL, NULL, NULL, NULL),
(9, 100004, 1, 'Ali Raza', 'BM1234567', '987654321', '1980-01-15', 'Male', 'Adult', 'Yes', 'GRP-1122', 'XYZABC', '2022-05-20', '2032-05-19'),
(10, 100004, 0, 'Saba Ali', 'BP7654321', '987654322', '1982-03-22', 'Female', 'Adult', 'Yes', 'GRP-1122', 'XYZABC', '2022-05-20', '2032-05-19'),
(11, 100004, 0, 'Hassan Ali', 'CH9988776', '987654323', '2015-11-10', 'Male', 'Child', 'Yes', 'GRP-1122', 'XYZABC', '2023-01-30', '2028-01-29'),
(12, 100004, 0, 'Ayesha Ali', 'IN6655443', '987654324', '2024-08-01', 'Female', 'Infant', 'No', 'GRP-1122', 'XYZABC', '2024-09-01', '2029-08-31'),
(13, 100005, 1, 'Sultan Khan', 'GH5566778', NULL, NULL, NULL, 'Adult', 'Yes', NULL, NULL, NULL, NULL),
(14, 100005, 0, 'Reshma Sultan', 'GH5566779', NULL, NULL, NULL, 'Adult', 'Yes', NULL, NULL, NULL, NULL),
(15, 100005, 0, 'Kamran Sultan', 'GH5566780', NULL, NULL, NULL, 'Adult', 'Yes', NULL, NULL, NULL, NULL),
(16, 100005, 0, 'Imran Sultan', 'GH5566781', NULL, NULL, NULL, 'Adult', 'Yes', NULL, NULL, NULL, NULL),
(17, 100005, 0, 'Adnan Sultan', 'GH5566782', NULL, NULL, NULL, 'Adult', 'Yes', NULL, NULL, NULL, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `rate_entries`
--

DROP TABLE IF EXISTS `rate_entries`;
CREATE TABLE IF NOT EXISTS `rate_entries` (
  `id` int NOT NULL AUTO_INCREMENT,
  `rate_sheet_id` int NOT NULL,
  `period_from` date NOT NULL,
  `period_till` date NOT NULL,
  `room_type` varchar(50) NOT NULL,
  `rate_weekday` decimal(10,2) NOT NULL,
  `rate_weekend` decimal(10,2) NOT NULL,
  `rate_4_nights` decimal(10,2) DEFAULT NULL,
  `supplement_ex_bed` decimal(10,2) DEFAULT NULL,
  `supplement_meal_plan` varchar(20) DEFAULT NULL,
  `meal_rate_lunch` decimal(10,2) DEFAULT NULL,
  `meal_rate_dinner` decimal(10,2) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `rate_sheet_id` (`rate_sheet_id`)
) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `rate_entries`
--

INSERT INTO `rate_entries` (`id`, `rate_sheet_id`, `period_from`, `period_till`, `room_type`, `rate_weekday`, `rate_weekend`, `rate_4_nights`, `supplement_ex_bed`, `supplement_meal_plan`, `meal_rate_lunch`, `meal_rate_dinner`, `created_at`) VALUES
(8, 5, '2025-10-03', '2025-10-10', 'dasd', 213.00, 23.00, 123.00, 213.00, '32', 21.00, 32.00, '2025-09-27 17:58:35'),
(9, 6, '2025-10-01', '2025-10-09', 'single', 0.01, 0.01, NULL, 0.00, '0', 0.00, 0.00, '2025-09-27 19:42:56');

-- --------------------------------------------------------

--
-- Table structure for table `rate_sheets`
--

DROP TABLE IF EXISTS `rate_sheets`;
CREATE TABLE IF NOT EXISTS `rate_sheets` (
  `id` int NOT NULL AUTO_INCREMENT,
  `hotel_name` varchar(255) NOT NULL,
  `city` varchar(50) NOT NULL,
  `stars` tinyint DEFAULT NULL,
  `vendor_id` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `rate_sheets`
--

INSERT INTO `rate_sheets` (`id`, `hotel_name`, `city`, `stars`, `vendor_id`, `created_at`) VALUES
(5, 'test', 'makkah', 5, NULL, '2025-09-27 17:57:43'),
(6, 'test', 'makkah', 1, NULL, '2025-09-27 19:42:02'),
(7, 'test 2232', 'madinah', 5, NULL, '2025-09-27 19:44:44'),
(8, 'test 2232', 'madinah', 3, NULL, '2025-09-27 19:46:06'),
(9, 'test Am', 'makkah', 4, NULL, '2025-09-27 21:16:51');

-- --------------------------------------------------------

--
-- Table structure for table `request_accommodations`
--

DROP TABLE IF EXISTS `request_accommodations`;
CREATE TABLE IF NOT EXISTS `request_accommodations` (
  `id` int NOT NULL AUTO_INCREMENT,
  `request_id` int NOT NULL,
  `city` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `hotel_preference` text CHARACTER SET latin1 COLLATE latin1_swedish_ci,
  `check_in_date` date DEFAULT NULL,
  `nights` int DEFAULT NULL,
  `room_type` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `meal_plan` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `request_id` (`request_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `request_mutamers`
--

DROP TABLE IF EXISTS `request_mutamers`;
CREATE TABLE IF NOT EXISTS `request_mutamers` (
  `id` int NOT NULL AUTO_INCREMENT,
  `request_id` int NOT NULL,
  `mutamer_name` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `passport_no` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `pax_type` enum('Adult','Child','Infant') CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT 'Adult',
  `bed_required` enum('Yes','No') CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT 'Yes',
  PRIMARY KEY (`id`),
  KEY `request_id` (`request_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `ticket_invoices`
--

DROP TABLE IF EXISTS `ticket_invoices`;
CREATE TABLE IF NOT EXISTS `ticket_invoices` (
  `id` int NOT NULL AUTO_INCREMENT,
  `invoice_number` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `user_id` int DEFAULT NULL,
  `vendor_id` int DEFAULT NULL,
  `quick_booking_id` int DEFAULT NULL,
  `booking_id` int DEFAULT NULL,
  `guest_name` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `issue_date` date NOT NULL,
  `status` enum('Tentative','Approved','Cancelled') CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT 'Tentative',
  `adult_qty` int NOT NULL DEFAULT '0',
  `adult_rate` decimal(12,2) NOT NULL DEFAULT '0.00',
  `adult_cost` decimal(10,2) NOT NULL DEFAULT '0.00',
  `child_qty` int NOT NULL DEFAULT '0',
  `child_rate` decimal(12,2) NOT NULL DEFAULT '0.00',
  `child_cost` decimal(10,2) NOT NULL DEFAULT '0.00',
  `infant_qty` int NOT NULL DEFAULT '0',
  `infant_rate` decimal(12,2) NOT NULL DEFAULT '0.00',
  `infant_cost` decimal(10,2) NOT NULL DEFAULT '0.00',
  `total_fare_pkr` decimal(12,2) NOT NULL DEFAULT '0.00',
  `total_fare_pkr_cost` decimal(10,2) NOT NULL DEFAULT '0.00',
  `service_fee_pkr` decimal(10,2) NOT NULL DEFAULT '0.00',
  `vendor_commission_pkr` decimal(10,2) NOT NULL DEFAULT '0.00',
  `discount_pkr` decimal(10,2) NOT NULL DEFAULT '0.00',
  `grand_total_pkr` decimal(12,2) NOT NULL DEFAULT '0.00',
  `grand_total_pkr_cost` decimal(10,2) NOT NULL DEFAULT '0.00',
  `notes` text CHARACTER SET latin1 COLLATE latin1_swedish_ci,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `ticket_invoices`
--

INSERT INTO `ticket_invoices` (`id`, `invoice_number`, `user_id`, `vendor_id`, `quick_booking_id`, `booking_id`, `guest_name`, `issue_date`, `status`, `adult_qty`, `adult_rate`, `adult_cost`, `child_qty`, `child_rate`, `child_cost`, `infant_qty`, `infant_rate`, `infant_cost`, `total_fare_pkr`, `total_fare_pkr_cost`, `service_fee_pkr`, `vendor_commission_pkr`, `discount_pkr`, `grand_total_pkr`, `grand_total_pkr_cost`, `notes`, `created_at`, `updated_at`) VALUES
(2, 'TKT-25-002', 16, NULL, NULL, NULL, 'Fatima Khan', '2025-09-28', 'Approved', 1, 45000.00, 44000.00, 0, 0.00, 0.00, 0, 0.00, 0.00, 45000.00, 44000.00, 1000.00, 0.00, 0.00, 46000.00, 44000.00, 'One-way ticket to Dubai.', '2025-09-28 13:40:56', '2025-09-28 13:40:56'),
(3, 'TKT-25-003', 26, NULL, NULL, NULL, 'Usman Farooq Family', '2025-09-30', 'Approved', 2, 85000.00, 83500.00, 1, 65000.00, 64000.00, 0, 0.00, 0.00, 235000.00, 231000.00, 3000.00, 0.00, 0.00, 238000.00, 231000.00, 'Family trip to Istanbul on Turkish Airlines.', '2025-09-28 13:44:38', '2025-09-28 13:44:38');

-- --------------------------------------------------------

--
-- Table structure for table `ticket_invoice_flights`
--

DROP TABLE IF EXISTS `ticket_invoice_flights`;
CREATE TABLE IF NOT EXISTS `ticket_invoice_flights` (
  `id` int NOT NULL AUTO_INCREMENT,
  `ticket_invoice_id` int NOT NULL,
  `airline` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `flight_no` varchar(20) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `sector` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `departure_datetime` datetime DEFAULT NULL,
  `arrival_datetime` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `ticket_invoice_id` (`ticket_invoice_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `ticket_invoice_flights`
--

INSERT INTO `ticket_invoice_flights` (`id`, `ticket_invoice_id`, `airline`, `flight_no`, `sector`, `departure_datetime`, `arrival_datetime`) VALUES
(2, 2, 'Emirates', 'EK623', 'LHE-DXB', '2025-11-05 10:30:00', '2025-11-05 13:00:00'),
(3, 3, 'Turkish Airlines', 'TK715', 'ISB-IST', '2025-11-20 06:10:00', '2025-11-20 10:25:00'),
(4, 3, 'Turkish Airlines', 'TK714', 'IST-ISB', '2025-11-30 20:45:00', '2025-12-01 04:20:00');

-- --------------------------------------------------------

--
-- Table structure for table `ticket_invoice_passengers`
--

DROP TABLE IF EXISTS `ticket_invoice_passengers`;
CREATE TABLE IF NOT EXISTS `ticket_invoice_passengers` (
  `id` int NOT NULL AUTO_INCREMENT,
  `ticket_invoice_id` int NOT NULL,
  `full_name` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `passenger_type` enum('Adult','Child','Infant') CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT 'Adult',
  `passport_no` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `pnr` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `ticket_number` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `dob` date DEFAULT NULL,
  `passport_issue_date` date DEFAULT NULL,
  `passport_expiry_date` date DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `ticket_invoice_id` (`ticket_invoice_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `ticket_invoice_passengers`
--

INSERT INTO `ticket_invoice_passengers` (`id`, `ticket_invoice_id`, `full_name`, `passenger_type`, `passport_no`, `pnr`, `ticket_number`, `dob`, `passport_issue_date`, `passport_expiry_date`) VALUES
(2, 2, 'Fatima Khan', 'Adult', 'AZ1122334', 'L8PR2A', '157-1234567890', '1995-02-28', NULL, NULL),
(3, 3, 'Usman Farooq', 'Adult', 'TR112233', 'PQR789', '235-1112223330', NULL, NULL, NULL),
(4, 3, 'Saima Usman', 'Adult', 'TR112244', 'PQR789', '235-1112223331', NULL, NULL, NULL),
(5, 3, 'Danial Usman', 'Child', 'TR112255', 'PQR789', '235-1112223332', NULL, NULL, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `transport_rates`
--

DROP TABLE IF EXISTS `transport_rates`;
CREATE TABLE IF NOT EXISTS `transport_rates` (
  `id` int NOT NULL AUTO_INCREMENT,
  `sector_name` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `sedan_rate` decimal(10,2) DEFAULT '0.00',
  `starex_rate` decimal(10,2) DEFAULT '0.00',
  `staria_rate` decimal(10,2) DEFAULT '0.00',
  `gmc_rate` decimal(10,2) DEFAULT '0.00',
  `hiace_rate` decimal(10,2) DEFAULT '0.00',
  `coaster_rate` decimal(10,2) DEFAULT '0.00',
  `bus_rate` decimal(10,2) DEFAULT '0.00',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `transport_rates`
--

INSERT INTO `transport_rates` (`id`, `sector_name`, `sedan_rate`, `starex_rate`, `staria_rate`, `gmc_rate`, `hiace_rate`, `coaster_rate`, `bus_rate`) VALUES
(3, 'Jeddah to makah', 250.00, 522.00, 522.00, 5225.00, 525.00, 22.00, 0.00);

-- --------------------------------------------------------

--
-- Table structure for table `umrah_inquiries`
--

DROP TABLE IF EXISTS `umrah_inquiries`;
CREATE TABLE IF NOT EXISTS `umrah_inquiries` (
  `id` int NOT NULL AUTO_INCREMENT,
  `package_id` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `package_name` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `customer_name` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `customer_phone` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `customer_email` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `room_type` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `pax` int DEFAULT NULL,
  `user_id` int DEFAULT NULL,
  `status` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT 'Pending',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `umrah_inquiries`
--

INSERT INTO `umrah_inquiries` (`id`, `package_id`, `package_name`, `customer_name`, `customer_phone`, `customer_email`, `room_type`, `pax`, `user_id`, `status`, `created_at`) VALUES
(1, 'UMR-004', '21 DAYS UMRAH PACKAGE', 'toheed', '03336668684', 'binmasood.net@gmail.com', 'Triple', 5, 9, 'In Progress', '2025-09-27 18:05:13'),
(2, 'UMR-005', '21 DAYS UMRAH PACKAGE', 'werwe', 'wer', 'wer@asd.com', 'Quad', 2, 10, 'Pending', '2025-09-27 20:55:03'),
(3, 'UMR-006', '15 DAYS 5-STAR UMRAH', 'Alice Johnson', '03001112233', 'alice.j@example.com', 'Double', 2, 13, 'New', '2025-09-28 04:35:10');

-- --------------------------------------------------------

--
-- Table structure for table `umrah_packages`
--

DROP TABLE IF EXISTS `umrah_packages`;
CREATE TABLE IF NOT EXISTS `umrah_packages` (
  `package_id` varchar(50) NOT NULL,
  `package_name` varchar(255) NOT NULL,
  `airline_id` int DEFAULT NULL,
  `price_double` decimal(10,2) DEFAULT NULL,
  `price_double_agent` decimal(10,2) DEFAULT NULL,
  `price_triple` decimal(10,2) DEFAULT NULL,
  `price_triple_agent` decimal(10,2) DEFAULT NULL,
  `price_quad` decimal(10,2) DEFAULT NULL,
  `price_quad_agent` decimal(10,2) DEFAULT NULL,
  `price_quint` decimal(10,2) DEFAULT NULL,
  `price_quint_agent` decimal(10,2) DEFAULT NULL,
  `makkah_hotel` varchar(255) DEFAULT NULL,
  `madinah_hotel` varchar(255) DEFAULT NULL,
  `transportation` varchar(50) DEFAULT 'Sharing',
  `ziyarat` varchar(10) DEFAULT 'No',
  `days` int NOT NULL,
  `page_link` varchar(255) DEFAULT NULL,
  `main_image_link` varchar(255) DEFAULT NULL,
  `logo_has_background` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1 = Yes (white box), 0 = No (transparent)',
  `flyer_image_path` varchar(255) DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT '1',
  `overview` text,
  `itinerary` text,
  `whats_included` text,
  `whats_extra` text,
  `outbound_flight_details` text,
  `inbound_flight_details` text,
  `agent_incentive` decimal(10,2) NOT NULL DEFAULT '0.00',
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`package_id`),
  KEY `fk_umrah_package_airline` (`airline_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `umrah_packages`
--

INSERT INTO `umrah_packages` (`package_id`, `package_name`, `airline_id`, `price_double`, `price_double_agent`, `price_triple`, `price_triple_agent`, `price_quad`, `price_quad_agent`, `price_quint`, `price_quint_agent`, `makkah_hotel`, `madinah_hotel`, `transportation`, `ziyarat`, `days`, `page_link`, `main_image_link`, `logo_has_background`, `flyer_image_path`, `is_active`, `overview`, `itinerary`, `whats_included`, `whats_extra`, `outbound_flight_details`, `inbound_flight_details`, `agent_incentive`, `last_updated`) VALUES
('1', 'test', 25, 231.00, 123.00, 313.00, 123.00, 131.00, 123.00, 23.00, 123.00, 'Makkah Clock Royal Tower', 'AL EERI 3 STAR - SHUTTLE SERVICE', 'Sharing', 'Yes', 1, 'ttest', 'https://www.ahstatic.com/photos/5209_ho_00_p_1024x768.jpg', 1, NULL, 1, 'asd', 'ads', 'sad', 'asd', 'SV727 - ISB to JED - 03:00 / 06:10', 'SV726 - JED to ISB - 18:10 / 01:20', 10.00, '2025-09-30 20:11:23'),
('123', '123', 11, 12.00, 1231.00, 12.00, 31.00, 2313.00, 313.00, 1231.00, 1.00, '23', '123', 'Sharing', 'Yes', 123, '1234-days', 'https://www.ahstatic.com/photos/5209_ho_00_p_1024x768.jpg', 0, NULL, 1, '234242', '34234d', '2d4', '34', 'SV727 - ISB to JED - 03:00 / 06:10', 'SV726 - JED to ISB - 18:10 / 01:20', 10.00, '2025-10-01 12:21:04'),
('UMR-001', '21 DAYS UMRAH PACKAGE', NULL, 301000.00, NULL, 273500.00, NULL, 263000.00, NULL, 248000.00, NULL, 'DAIRY / JOHRA MAJD - 850 M', 'DAR AJYAL 1 - 750 M', 'Sharing', 'Yes', 21, '21-days-umrah-package', 'https://t4.ftcdn.net/jpg/00/87/51/71/360_F_87517185_TnJGDTGa3PKJKvakVdw6ExM5fggHO4mi.jpg', 0, '0', 1, 'Experience a spiritually fulfilling journey with our 21-Day Umrah Package (Without Ziyarat). This package is designed to provide pilgrims with a comfortable stay and essential services, focusing solely on performing Umrah rituals with peace of mind. Accommodation and travel arrangements are included, while ziyarat tours are not part of this package.', 'Day 1: Departure from [City, Country] and arrival in Jeddah/Madinah. Transfer to hotel for check-in.\r\n\r\nDay 2 – Day 20: Stay in Makkah and Madinah as per package. Pilgrims will perform Umrah and have free time for individual prayers and worship.\r\n\r\nDay 21: Check-out from hotel. Transfer to airport for return flight to [City, Country].', 'VISA\r\nTICKET\r\nTRANSPORT\r\nHOTEL', '', 'LHE-JED 08-OCT 20 KG', 'JED-LHE 28-OCT 30 KG', 0.00, '2025-10-01 15:11:15'),
('UMR-002', '21 DAYS UMRAH PACKAGE', NULL, 311000.00, NULL, 283500.00, NULL, 273000.00, NULL, 258000.00, NULL, 'FUNDAQ JAFFARIA - 700 M', 'DAR AJYAL 1 - 750 M', 'Sharing', '0', 21, '21-days-umrah-package', 'https://www.holyhajjnumrah.com/images/list-of-mosques-in-madinah-saudi-arabia.webp', 1, '0', 1, 'Experience a spiritually fulfilling journey with our 21-Day Umrah Package (Without Ziyarat). This package is designed to provide pilgrims with a comfortable stay and essential services, focusing solely on performing Umrah rituals with peace of mind. Accommodation and travel arrangements are included, while ziyarat tours are not part of this package.', 'Day 1: Departure from [City, Country] and arrival in Jeddah/Madinah. Transfer to hotel for check-in.\r\n\r\nDay 2 – Day 20: Stay in Makkah and Madinah as per package. Pilgrims will perform Umrah and have free time for individual prayers and worship.\r\n\r\nDay 21: Check-out from hotel. Transfer to airport for return flight to [City, Country].', 'VISA\r\nTICKET\r\nTRANSPORT\r\nHOTEL', '', 'LHE-JED 08-OCT 20 KG', 'JED-LHE 28-OCT 30 KG', 0.00, '2025-09-27 13:46:42'),
('UMR-003', '21 DAYS UMRAH PACKAGE', NULL, 295000.00, NULL, 272000.00, NULL, 259000.00, NULL, 252000.00, NULL, 'QILA AJYAAD - SHUTTLE SERVICE', 'AL EERI 3 STAR - SHUTTLE SERVICE', 'Sharing', '0', 21, '21-days-umrah-package', 'https://www.worldconstructionnetwork.com/wp-content/uploads/sites/26/2020/01/Featured-Image-Makkah-Royal-Clock-Tower-Saudi-Arabia.jpg', 1, '0', 0, 'Experience a spiritually fulfilling journey with our 21-Day Umrah Package (Without Ziyarat). This package is designed to provide pilgrims with a comfortable stay and essential services, focusing solely on performing Umrah rituals with peace of mind. Accommodation and travel arrangements are included, while ziyarat tours are not part of this package.', 'Day 1: Departure from [City, Country] and arrival in Jeddah/Madinah. Transfer to hotel for check-in.\r\n\r\nDay 2 – Day 20: Stay in Makkah and Madinah as per package. Pilgrims will perform Umrah and have free time for individual prayers and worship.\r\n\r\nDay 21: Check-out from hotel. Transfer to airport for return flight to [City, Country].', 'VISA\r\nTICKET\r\nTRANSPORT\r\nHOTEL', '', '15 OCT SV LHE - JED 02:50  06:00', '04 NOV SV JED - LHE 03:10  09:45', 0.00, '2025-09-27 13:47:02'),
('UMR-004', '21 DAYS UMRAH PACKAGE', NULL, 333000.00, NULL, 298000.00, NULL, 279000.00, NULL, 266000.00, NULL, 'JOHRA MAJAD - 700 M', 'LOJIN GOLDEN - 600 M', 'Sharing', '0', 21, '21-days-umrah-package', 'https://www.worldconstructionnetwork.com/wp-content/uploads/sites/26/2020/01/Featured-Image-Makkah-Royal-Clock-Tower-Saudi-Arabia.jpg', 1, '0', 1, 'Experience a spiritually fulfilling journey with our 21-Day Umrah Package (Without Ziyarat). This package is designed to provide pilgrims with a comfortable stay and essential services, focusing solely on performing Umrah rituals with peace of mind. Accommodation and travel arrangements are included, while ziyarat tours are not part of this package.', 'Day 1: Departure from [City, Country] and arrival in Jeddah/Madinah. Transfer to hotel for check-in.\r\n\r\nDay 2 – Day 20: Stay in Makkah and Madinah as per package. Pilgrims will perform Umrah and have free time for individual prayers and worship.\r\n\r\nDay 21: Check-out from hotel. Transfer to airport for return flight to [City, Country].', 'VISA\r\nTICKET\r\nTRANSPORT\r\nHOTEL', '', '15 OCT SV LHE - JED 02:50  06:00', '04 NOV SV JED - LHE 03:10  09:45', 0.00, '2025-09-27 13:46:53'),
('UMR-006', '15 DAYS 5-STAR UMRAH', 8, 450000.00, NULL, 420000.00, NULL, 400000.00, NULL, NULL, NULL, 'Makkah Clock Royal Tower', 'Dar Al-Hijra InterContinental', 'Private', 'Yes', 15, '15-days-5-star-umrah', 'https://www.arabianbusiness.com/cloud/2022/09/27/makkah-clock-tower.jpg', 1, NULL, 1, 'Experience a luxurious and spiritual journey with our 15-day 5-star Umrah package.', '7 nights in Makkah, 8 nights in Madinah with guided Ziyarat tours.', 'VISA, TICKET (Emirates), 5-STAR HOTEL, PRIVATE TRANSPORT, ZIYARAT', '', 'KHI-JED (Direct)', 'MED-KHI (Direct)', 0.00, '2025-09-30 21:32:13'),
('UMR-007', '21 DAYS UMRAH PACKAGE', NULL, 200.00, 199.00, 300.00, 299.00, 400.00, 399.00, 100.00, 99.00, 'Makkah Clock Royal Tower', 'Dar Al-Hijra InterContinental', 'Sharing', 'Yes', 21, '25-days-umrah-package', 'https://www.ahstatic.com/photos/5209_ho_00_p_1024x768.jpg', 1, NULL, 1, 'test', 'test1', 'test2', 'test3', 'SV727 - ISB to JED - 03:00 / 06:10', 'SV726 - JED to ISB - 18:10 / 01:20', 10.00, '2025-09-30 19:44:40'),
('UMR-009', '25 DAYS UMRAH PACKAGE', 27, 1231.00, 123.00, 3.00, 13.00, 131.00, 1231.00, 23.00, 23.00, 'QILA AJYAAD - SHUTTLE SERVICE', 'Dar Al-Hijra InterContinental', 'Sharing', 'Yes', 25, '27-days-umrah-package', 'https://www.worldconstructionnetwork.com/wp-content/uploads/sites/26/2020/01/Featured-Image-Makkah-Royal-Clock-Tower-Saudi-Arabia.jpg', 1, NULL, 1, '232', 'wewq', 'qe', 'qwe', '1233', '1233', 120.00, '2025-09-30 19:57:58'),
('UMR-010', 'testerererr', NULL, 200.00, 199.00, 300.00, 299.00, 400.00, 399.00, 100.00, 99.00, 'QILA AJYAAD - SHUTTLE SERVICE', 'Dar Al-Hijra InterContinentals', 'Sharing', 'No', 10, '10-days', 'https://www.worldconstructionnetwork.com/wp-content/uploads/sites/26/2020/01/Featured-Image-Makkah-Royal-Clock-Tower-Saudi-Arabia.jpg', 0, NULL, 1, 'qweqe', 'qewqwe', 'qwewcqc', 'qcceqwc', 'SV727 - ISB to JED - 03:00 / 06:10', 'SV726 - JED to ISB - 18:10 / 01:20', 10.00, '2025-10-01 14:13:37'),
('UMR-5STAR-15', '15 DAYS 5-STAR UMRAH', NULL, 450000.00, 234.00, 420000.00, 234.00, 400000.00, 234.00, NULL, 234.00, 'Makkah Clock Royal Tower', 'Dar Al-Hijra InterContinental', 'Private', 'Yes', 15, '15-days-5-star-umrah', 'https://www.ahstatic.com/photos/5209_ho_00_p_1024x768.jpg', 1, NULL, 1, '', '', '', '', 'KHI-JED (Direct)', 'MED-KHI (Direct)', 230.00, '2025-09-30 20:07:16'),
('UMR-DLX-20', '20 Days Deluxe Umrah Package', 15, 380000.00, NULL, 350000.00, NULL, 335000.00, NULL, NULL, NULL, 'Swissotel Makkah', 'Dar Al Taqwa Hotel Madinah', 'Private Car', 'Yes', 20, '20-days-deluxe-umrah', 'https://example.com/deluxe-umrah.jpg', 1, NULL, 1, 'A premium Umrah experience with stays at 5-star hotels right next to the Harams, including private transport and guided Ziyarat tours in both holy cities.', '10 Nights in Makkah, 10 Nights in Madinah. Includes a full day for Ziyarat in each city.', NULL, NULL, NULL, NULL, 0.00, '2025-09-28 13:44:38'),
('UMR-SV-21', '21 DAYS UMRAH PACKAGE', NULL, 333000.00, NULL, 298000.00, NULL, 279000.00, NULL, 266000.00, NULL, 'JOHRA MAJAD - 700 M', 'LOJIN GOLDEN - 600 M', 'Sharing', 'No', 21, '21-days-umrah-package-sv', 'https://lh3.googleusercontent.com/p/AF1QipNX4Ld_b_4n-sF2n0bS-n7vG7w9_V5tqY5bB5I=s1360-w1360-h1020', 1, NULL, 1, NULL, NULL, NULL, NULL, '15 OCT SV LHE - JED 02:50 06:00', '04 NOV SV JED - LHE 03:10 09:45', 0.00, '2025-09-28 13:52:46');

-- --------------------------------------------------------

--
-- Table structure for table `users`
--

DROP TABLE IF EXISTS `users`;
CREATE TABLE IF NOT EXISTS `users` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_type` enum('customer','agent','admin') CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT 'customer',
  `name` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `email` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `password` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `mobile_number` varchar(20) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `company_name` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `company_address` text CHARACTER SET latin1 COLLATE latin1_swedish_ci,
  `city` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `branch` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `logo_path` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `email` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`id`, `user_type`, `name`, `email`, `password`, `mobile_number`, `company_name`, `company_address`, `city`, `branch`, `logo_path`, `created_at`) VALUES
(1, 'customer', 'Tayyab Manzur', 'tayyabmanzur22@gmail.com', '$2y$10$ZJYGsXlQCT8yPL.PJqX46e2aeZVF.wPqyDI.A3ASntcElGJ7UJPse', '+923185699665', NULL, NULL, NULL, NULL, NULL, '2025-07-17 20:21:58'),
(2, 'agent', 'Tayyab Manzur', 'tayyabmanzur2@gmail.com', '$2y$10$mfaaqtuyQ0BBbT09C6Tj5uPnOy6xC1SQpTMVAyjF04s3kBaWV2OdG', '03175724279', 'Plain Sprout', 'Pakistan, Rawalpindi, Chakra, near Gul Aftab Property Center', '', '', 'logo-2-688f4e6fd5684.png', '2025-07-17 22:14:47'),
(4, 'admin', 'Admin User', 'admin@example.com', '$2y$10$3z.5aJ4e.iA4yqR8b9zC7uOQz.1ZgBwX2e3e4f5g6h7i8j9k0l1m', '03001234567', NULL, NULL, NULL, NULL, NULL, '2025-07-18 00:23:13'),
(5, 'admin', 'Admin User', 'admin@travelfirst.pk', '$2y$10$QPQBMSH8b9VZAAsE4HNWkeIBFX.38X9dC9oXs7Z14sQ6yALZ8bp3m', '03336668684', NULL, NULL, NULL, NULL, NULL, '2025-07-18 00:23:44'),
(6, 'admin', 'MUHAMMAD HUZAIFA', 'huzaifaattari000@gmail.com', '$2y$10$wz2DV39OB/eSv48ZuQ7LO.lI9oIeBrsvCLbrg5v24GFb.s8AfZqGm', '0303-7763000', NULL, NULL, NULL, NULL, NULL, '2025-09-18 09:36:11'),
(7, 'customer', 'MUHAMMAD HUZAIFA ATTARI', 'andofthe@gmail.com', '$2y$10$H9DOoO9I7Ro1UQEtkyLF0e1lcXIGWLUrJRi50t6tS0XmyBa/TS./e', NULL, NULL, NULL, NULL, NULL, NULL, '2025-09-18 10:27:46'),
(8, 'customer', 'toheed', 'toheed@toheed.pk', '$2y$10$eSPuA15sC7JTHGU5tEukMOGKMrMSVHVEsW0gImzBKe.GO4E619.GG', '03336668684', NULL, NULL, NULL, NULL, NULL, '2025-09-19 13:17:30'),
(9, 'admin', 'toheed', 'toheed@toheed.toheed', '$2y$10$ajg7akmn2SZRigY8/iYFk.pFVJO9diJpdTBWDwTawOY5MtlGpbNBO', '03336668684', 'muhabiya', 'Do Dai Road Larkana', 'Islamabad', '', 'uploads/logos/logo-9-68dd419192ac7.png', '2025-09-26 20:04:14'),
(10, 'customer', 'customer', 'customer@gmail.com', '$2y$10$YtcfBEjk2lb0EXkutsRGUOo9x5eLe7Lt40vx00E7kCuxbg16m.KE.', '033623536223', NULL, NULL, NULL, NULL, NULL, '2025-09-27 19:39:01'),
(11, 'agent', 'agent', 'agent@gmail.com', '$2y$10$psXE63r/Yj4J3noKWdARxOUwz6A8dMrGg8Yty4jzZVWYSBqka/zme', '03336668684', NULL, NULL, NULL, NULL, NULL, '2025-09-27 19:39:23'),
(12, 'admin', 'admin', 'admin@gmail.com', '$2y$10$68LoAqGuCpOMA9tSIv3xoOFdGj/zdEucPGrLJGHjIETilV6IqoiBq', '03336668684', NULL, NULL, NULL, NULL, NULL, '2025-09-27 19:40:52'),
(13, 'customer', 'Alice Johnson', 'alice.j@example.com', '$2y$10$fGvM9.Bw.T5.xN8J8h3j7uK9z.c1VdG2hI3jL4k5mN6oP7qR8sT9', '03001112233', NULL, NULL, NULL, NULL, NULL, '2025-09-28 04:10:15'),
(14, 'agent', 'Bob Williams', 'bob.w@agenttravel.com', '$2y$10$wz2DV39OB/eSv48ZuQ7LO.lI9oIeBrsvCLbrg5v24GFb.s8AfZqGm', '03112223344', 'Williams Travel Co', '123 Travel Street, Karachi', 'Karachi', 'Main Branch', NULL, '2025-09-28 04:12:30'),
(16, 'customer', 'Fatima Khan', 'fatima.k@example.com', '$2y$10$R9l.f.9t.yG3h.uJ7i.kL.mN2o.pQ4r.sT6u.vW8x.yZ0a.bC1d.e', '03211234567', NULL, NULL, NULL, NULL, NULL, '2025-09-28 09:00:00'),
(17, 'agent', 'Global Travels Lahore', 'contact@globaltravels.pk', '$2y$10$S3g.hJ5k.lM7n.oP9q.rT1u.vW3x.yZ5a.bC7d.eF9g.hI1j.kL2', '03019876543', 'Global Travels (Pvt) Ltd', 'Office 1, Plaza 2, Gulberg', 'Lahore', 'Main', NULL, '2025-09-28 09:05:00'),
(18, 'admin', 'Super Admin', 'superadmin@ly.com', '$2y$10$68LoAqGuCpOMA9tSIv3xoOFdGj/zdEucPGrLJGHjIETilV6IqoiBq', '03330000000', NULL, NULL, NULL, NULL, NULL, '2025-09-28 09:06:00'),
(20, 'customer', 'Aisha Siddiqui', 'aisha.s@example.com', '$2y$10$R9l.f.9t.yG3h.uJ7i.kL.mN2o.pQ4r.sT6u.vW8x.yZ0a.bC1d.e', '03451122334', NULL, NULL, NULL, NULL, NULL, '2025-09-29 05:00:00'),
(21, 'agent', 'Sky High Travels', 'info@skyhightravels.com', '$2y$10$S3g.hJ5k.lM7n.oP9q.rT1u.vW3x.yZ5a.bC7d.eF9g.hI1j.kL2', '03123456789', 'Sky High Travels Inc.', 'Suite 505, Business Tower, Shahrah-e-Faisal', 'Karachi', 'Head Office', NULL, '2025-09-29 05:05:00'),
(22, 'admin', 'System Operator', 'operator@ly.com', '$2y$10$68LoAqGuCpOMA9tSIv3xoOFdGj/zdEucPGrLJGHjIETilV6IqoiBq', '03008877665', NULL, NULL, NULL, NULL, NULL, '2025-09-29 05:06:00'),
(25, 'customer', 'Bilal Ahmed', 'bilal.a@example.com', '$2y$10$R9l.f.9t.yG3h.uJ7i.kL.mN2o.pQ4r.sT6u.vW8x.yZ0a.bC1d.e', '03334455667', NULL, NULL, NULL, NULL, NULL, '2025-09-30 04:00:00'),
(26, 'agent', 'Madinah Travels Faisalabad', 'info@madinahtravels.com', '$2y$10$S3g.hJ5k.lM7n.oP9q.rT1u.vW3x.yZ5a.bC7d.eF9g.hI1j.kL2', '03008665544', 'Madinah Travels & Tours', 'P-1, Susan Road', 'Faisalabad', 'Main Branch', NULL, '2025-09-30 04:05:00'),
(27, 'admin', 'Finance Department', 'finance@ly.com', '$2y$10$68LoAqGuCpOMA9tSIv3xoOFdGj/zdEucPGrLJGHjIETilV6IqoiBq', '03218877665', NULL, NULL, NULL, NULL, NULL, '2025-09-30 04:06:00');

-- --------------------------------------------------------

--
-- Table structure for table `vendors`
--

DROP TABLE IF EXISTS `vendors`;
CREATE TABLE IF NOT EXISTS `vendors` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `company_name` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `services` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `phone_number` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `email` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `bank_account_title` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `bank_name` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `bank_account_number` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `bank_iban` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `vendors`
--

INSERT INTO `vendors` (`id`, `name`, `company_name`, `services`, `phone_number`, `email`, `bank_account_title`, `bank_name`, `bank_account_number`, `bank_iban`, `created_at`) VALUES
(1, 'toheed', 'toheed', 'tickets', '03336668684', 'binmasood.net@gmail.com', 'Tayyab', 'ads', '78978619', '23424', '2025-09-27 18:06:52'),
(2, 'Al-Khair Transport', 'Al-Khair Group', 'transport', '03219876543', 'contact@alkhair.com', NULL, NULL, NULL, NULL, '2025-09-28 04:40:00'),
(4, 'Al Harmain Hotels KSA', 'Al Harmain Group', 'hotels', '+966501234567', 'reservations@alharmain.sa', 'Al Harmain Hotels', 'Al Rajhi Bank', '9876543210', 'SA0380000987654321012345', '2025-09-28 09:10:00'),
(5, 'SAPTCO Bus Services', 'Saudi Public Transport Company', 'transport', '+966920000877', 'info@saptco.com.sa', 'SAPTCO', 'Riyad Bank', '1122334455', 'SA4520000001122334455667', '2025-09-28 09:12:00'),
(6, 'Al Harmain Hotels KSA', 'Al Harmain Group', 'hotels', '+966501234567', 'reservations@alharmain.sa', 'Al Harmain Hotels', 'Al Rajhi Bank', '9876543210', 'SA0380000987654321012345', '2025-09-29 05:10:00'),
(7, 'SAPTCO Bus Services', 'Saudi Public Transport Company', 'transport', '+966920000877', 'info@saptco.com.sa', 'SAPTCO', 'Riyad Bank', '1122334455', 'SA4520000001122334455667', '2025-09-29 05:12:00'),
(8, 'Barakah Catering Services', 'Barakah Meals Co.', 'meals, catering', '+966559876543', 'orders@barakahcatering.sa', 'Barakah Catering', 'SABB', '8877665544', 'SA9870000008877665544332', '2025-09-29 05:14:00');

-- --------------------------------------------------------

--
-- Table structure for table `visas`
--

DROP TABLE IF EXISTS `visas`;
CREATE TABLE IF NOT EXISTS `visas` (
  `id` int NOT NULL AUTO_INCREMENT,
  `visa_name` varchar(255) NOT NULL,
  `page_link` varchar(255) DEFAULT NULL,
  `visa_type` varchar(255) DEFAULT NULL,
  `image_url` varchar(2048) NOT NULL,
  `image_alt` varchar(255) DEFAULT NULL,
  `overview` text,
  `documents_required` text,
  `how_to_apply` text,
  `fees_and_charges` text,
  `important_notes` text,
  `processing_time` varchar(100) DEFAULT NULL,
  `entry_type` varchar(100) DEFAULT NULL,
  `price` decimal(10,2) DEFAULT NULL,
  `price_agent` decimal(10,2) DEFAULT NULL,
  `price_note` varchar(100) DEFAULT NULL,
  `agent_incentive` decimal(10,2) NOT NULL DEFAULT '0.00',
  `is_active` tinyint(1) DEFAULT '1',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `page_link` (`page_link`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `visas`
--

INSERT INTO `visas` (`id`, `visa_name`, `page_link`, `visa_type`, `image_url`, `image_alt`, `overview`, `documents_required`, `how_to_apply`, `fees_and_charges`, `important_notes`, `processing_time`, `entry_type`, `price`, `price_agent`, `price_note`, `agent_incentive`, `is_active`, `created_at`, `last_updated`) VALUES
(17, 'Dubai Tourist Visa', 'testestest', 'test', 'https://www.arabianbusiness.com/cloud/2023/04/26/saudi-arabia-tourism.jpg', 'Saudi Arabia Tourist Visa', 'dASD', 'dasd', 'D AS', 'asd', 'weqeqw', '12313', '232123', 1312.00, NULL, '31', 0.00, 1, '2025-09-28 14:00:03', '2025-09-28 14:00:45');

-- --------------------------------------------------------

--
-- Table structure for table `visa_package_rates`
--

DROP TABLE IF EXISTS `visa_package_rates`;
CREATE TABLE IF NOT EXISTS `visa_package_rates` (
  `id` int NOT NULL AUTO_INCREMENT,
  `g1_pax` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT '1',
  `g1_rate` decimal(10,2) DEFAULT '0.00',
  `g2_pax` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT '2',
  `g2_rate` decimal(10,2) DEFAULT '0.00',
  `g3_pax` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT '3',
  `g3_rate` decimal(10,2) DEFAULT '0.00',
  `g4_pax` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT '4',
  `g4_rate` decimal(10,2) DEFAULT '0.00',
  `infant_rate` decimal(10,2) DEFAULT '0.00',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `vouchers`
--

DROP TABLE IF EXISTS `vouchers`;
CREATE TABLE IF NOT EXISTS `vouchers` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_id` int DEFAULT NULL,
  `vendor_id` int DEFAULT NULL,
  `invoice_id` int DEFAULT NULL,
  `status` enum('Tentative','Confirmed') CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT 'Tentative',
  `voucher_date` date NOT NULL,
  `family_head_name` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `booking_ref_no` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `manual_no` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `package_type` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT 'Standard',
  `package_duration_nights` int DEFAULT '21',
  `pax_summary` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL COMMENT 'e.g. (A-4 : C-0: I-0) Beds (4)',
  `shirka_logo_path` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL COMMENT 'File path for the uploaded Shirka logo',
  `shirka_name` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `transporter_name` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT 'Company Transport',
  `transport_type` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT 'Economy By Bus',
  `transport_description` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT 'Round Trip (Jed-Mak-Mad-Mak-Jed)',
  `transport_brn` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `transport_helpline_1` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `transport_helpline_2` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `hotel_checkin_time` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT '04:00 pm',
  `hotel_checkout_time` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT '02:00 pm',
  `notes_urdu` text CHARACTER SET latin1 COLLATE latin1_swedish_ci,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `vouchers`
--

INSERT INTO `vouchers` (`id`, `user_id`, `vendor_id`, `invoice_id`, `status`, `voucher_date`, `family_head_name`, `booking_ref_no`, `manual_no`, `package_type`, `package_duration_nights`, `pax_summary`, `shirka_logo_path`, `shirka_name`, `transporter_name`, `transport_type`, `transport_description`, `transport_brn`, `transport_helpline_1`, `transport_helpline_2`, `hotel_checkin_time`, `hotel_checkout_time`, `notes_urdu`, `created_at`) VALUES
(1, 10, NULL, 2, 'Tentative', '2025-09-27', 'tester', '', '100002', 'Star', 0, '(A-3:C-0:I-0) Beds(3)', '', '', 'Company Transport', 'Economy By Bus', 'Round Trip', '', '00092-3007763000', '0092-3001119170', '04:00 PM', '02:00 PM', '?? ?? ???? ??? ???? ?? ??????? ??? ??? ??? ??? ??? ?? ?? ????? ?? ?? ????? ??? ???? ??????? ????? ?? ????? ???\r\n???? ????? ????? ?????? ?? ??? ?? ???? ????? ???????? ?? ??? ?? ????? ??? ???? ???? ?? ???? ??? ????? ?????? ?? ???? ?? ?? ?? ??????? ?? ?? ??? ?? ???\r\n??? ??? ????? ???? ??? ?????? ????? ???? ????? ??? ??? ?????? ?? ???? ?? ??? ??? ???\r\n????? ?????? ?? ???? ???? ?? ??? ??? ??? (???? ??????? ?? ???? ??? ????? ???) ???? ?? ??????? ???? ?? ???? ??? ?? ???? ????\r\n??? ???? ???? ?? ????????? ????? ????? ? ????? ????? ?? ???????? ??? 3 ?? 5 ????? ?? ???? ???? ?? ???? ??? ???? ???? ?? ????? ?? ?????? ??? ???? ??? ????? ?? ????? ?? ????? ????\r\n???? ??????? ??? ???? ???? ?? ??? ???? ????? ??? ???? ???? ?? ????? ???? ?? ???? ??? ??? ?????\r\n??? ?? ???? ???? ??????? ???? ??? ??? ??? ?? ?? ?? ?? ???? ????? ???? ???? ?? ???? ?? ?? ??? ???? ???? ?? ???? ?? ????? ???? ?????\r\n???? ??? ?? ???? 4:00 ??? ??? ???? ??? ??? ???? 2:00 ??? ??? ?? ?? ??? ???? Night ???? ?? ??? ???? ????? ?? 4 ??? ?????? ???? ????? ??????\r\n????? ?? ????? ?? 10 ????? ??? ????? ???? ????? ?? ???? ??????? ?? ????? ????? ????? ?? ????? ?? ??????? ????? ?? ???? ??? ???? ??? ???? ?? ???? ??? ???? ?? ????? ?????\r\n????? ????? ?? ????? ??? ???? ????? ??? ???? ??? ??? ?? ???? ????? ?? ????? ??? ????? ?? ??????? ?????\r\n(Only Visa Cases) Self Accommodation ??? ??? ????? ??? ????? ?? ??????? ?? ??? ?? ??? ????? ?????? ???? ?? ?? ?? ?????? ????? ?? ???? ??? ??? ???\r\n????? ???? ???? ?? ????? ???? ?????? ????? ???? ?? ???? ????? ???? ???? ?? ??? ????????? ?? ??????? ????? ??? ??? ???', '2025-09-27 20:18:28');

-- --------------------------------------------------------

--
-- Table structure for table `voucher_accommodations`
--

DROP TABLE IF EXISTS `voucher_accommodations`;
CREATE TABLE IF NOT EXISTS `voucher_accommodations` (
  `id` int NOT NULL AUTO_INCREMENT,
  `voucher_id` int NOT NULL,
  `city` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `hotel_name` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `room_type` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT 'Quad',
  `check_in_date` date NOT NULL,
  `nights` int NOT NULL,
  `check_out_date` date NOT NULL,
  `view_type` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT 'Standard',
  `meal_plan` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT 'R/O',
  `confirmation_no` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `checkin_day_contact_name` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `checkin_day_contact_phone` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `checkin_night_contact_name` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `checkin_night_contact_phone` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `voucher_id` (`voucher_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `voucher_flights`
--

DROP TABLE IF EXISTS `voucher_flights`;
CREATE TABLE IF NOT EXISTS `voucher_flights` (
  `id` int NOT NULL AUTO_INCREMENT,
  `voucher_id` int NOT NULL,
  `direction` enum('Pakistan To KSA','KSA To Pakistan') CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `flight_no` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `sector` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `departure_datetime` datetime NOT NULL,
  `arrival_datetime` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `voucher_id` (`voucher_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `voucher_mutamers`
--

DROP TABLE IF EXISTS `voucher_mutamers`;
CREATE TABLE IF NOT EXISTS `voucher_mutamers` (
  `id` int NOT NULL AUTO_INCREMENT,
  `voucher_id` int NOT NULL,
  `mutamer_name` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `passport_no` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `pax_type` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT 'Adult',
  `bed_required` enum('Yes','No') CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT 'Yes',
  `group_no` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `visa_no` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `pnr_no` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `voucher_id` (`voucher_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `voucher_mutamers`
--

INSERT INTO `voucher_mutamers` (`id`, `voucher_id`, `mutamer_name`, `passport_no`, `pax_type`, `bed_required`, `group_no`, `visa_no`, `pnr_no`) VALUES
(4, 1, 'tester', '223', 'Adult', 'Yes', '223', '223', '223'),
(5, 1, 'tester12', '223', 'Adult', 'Yes', '223223', '223', '223'),
(6, 1, 'tester 2', '223', 'Adult', 'Yes', '223', '223', '223');

-- --------------------------------------------------------

--
-- Table structure for table `voucher_requests`
--

DROP TABLE IF EXISTS `voucher_requests`;
CREATE TABLE IF NOT EXISTS `voucher_requests` (
  `id` int NOT NULL AUTO_INCREMENT,
  `agent_id` int NOT NULL,
  `request_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `status` enum('Pending','In Progress','Completed','Rejected') CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT 'Pending',
  `family_head_name` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `package_type` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `package_duration_nights` int DEFAULT NULL,
  `pax_summary` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `desired_departure_date` date DEFAULT NULL,
  `desired_return_date` date DEFAULT NULL,
  `agent_notes` text CHARACTER SET latin1 COLLATE latin1_swedish_ci,
  `admin_notes` text CHARACTER SET latin1 COLLATE latin1_swedish_ci,
  `voucher_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `agent_id` (`agent_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `bookings`
--
ALTER TABLE `bookings`
  ADD CONSTRAINT `bookings_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Constraints for table `group_fares`
--
ALTER TABLE `group_fares`
  ADD CONSTRAINT `fk_airline` FOREIGN KEY (`airline_id`) REFERENCES `airlines` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `invoice_airline_tickets`
--
ALTER TABLE `invoice_airline_tickets`
  ADD CONSTRAINT `fk_ticket_invoice` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `invoice_hotels`
--
ALTER TABLE `invoice_hotels`
  ADD CONSTRAINT `fk_hotel_invoice` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `invoice_other_services`
--
ALTER TABLE `invoice_other_services`
  ADD CONSTRAINT `fk_service_invoice` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `invoice_pilgrims`
--
ALTER TABLE `invoice_pilgrims`
  ADD CONSTRAINT `fk_pilgrim_invoice` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `invoice_transports`
--
ALTER TABLE `invoice_transports`
  ADD CONSTRAINT `fk_transport_invoice` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `payments`
--
ALTER TABLE `payments`
  ADD CONSTRAINT `payments_ibfk_1` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `quick_bookings`
--
ALTER TABLE `quick_bookings`
  ADD CONSTRAINT `quick_bookings_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;

--
-- Constraints for table `quick_booking_passengers`
--
ALTER TABLE `quick_booking_passengers`
  ADD CONSTRAINT `quick_booking_passengers_ibfk_1` FOREIGN KEY (`booking_id`) REFERENCES `quick_bookings` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `ticket_invoice_flights`
--
ALTER TABLE `ticket_invoice_flights`
  ADD CONSTRAINT `fk_flights_to_ticket_invoice` FOREIGN KEY (`ticket_invoice_id`) REFERENCES `ticket_invoices` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `ticket_invoice_passengers`
--
ALTER TABLE `ticket_invoice_passengers`
  ADD CONSTRAINT `fk_passengers_to_ticket_invoice` FOREIGN KEY (`ticket_invoice_id`) REFERENCES `ticket_invoices` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `umrah_packages`
--
ALTER TABLE `umrah_packages`
  ADD CONSTRAINT `fk_umrah_package_airline` FOREIGN KEY (`airline_id`) REFERENCES `airlines` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;

--
-- Constraints for table `voucher_accommodations`
--
ALTER TABLE `voucher_accommodations`
  ADD CONSTRAINT `voucher_accommodations_ibfk_1` FOREIGN KEY (`voucher_id`) REFERENCES `vouchers` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `voucher_flights`
--
ALTER TABLE `voucher_flights`
  ADD CONSTRAINT `voucher_flights_ibfk_1` FOREIGN KEY (`voucher_id`) REFERENCES `vouchers` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `voucher_mutamers`
--
ALTER TABLE `voucher_mutamers`
  ADD CONSTRAINT `voucher_mutamers_ibfk_1` FOREIGN KEY (`voucher_id`) REFERENCES `vouchers` (`id`) ON DELETE CASCADE;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
